Terminate a program

Batch, ASP, JScript, Kixtart, etc.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
User avatar
Posts: 11
Joined: Thu Sep 24, 2009 7:44 pm

Terminate a program

Post by faisal7977 » Tue Nov 24, 2009 3:56 pm

i need to terminate a program using a script and i can do it with taskkill command in windows XP.The program i need to close is a video recording software. when i close it manually or through taskkill command, it asks"This will stop all the recordings, Are you sure you want to close the program" | YES | | NO |Now i need to answer this box to Yes. I can forcefully do this using /F parameter
but if i try to forcefully terminate the application either manually or
through a bat file, recording file get corrupted. I must reply this box to YES in order to save the video recording file properly.can i do this using command line scripting or some other scripting language required?faisal79772009-11-24 23:04:50

User avatar
Posts: 13143
Joined: Tue May 22, 2007 9:57 am

Terminate a program

Post by jvierra » Wed Nov 25, 2009 1:07 am

You can't really do this with a command line program, Look into the WSH/VBScript "SendKeys" method.