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.
This topic is 14 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
faisal7977
Posts: 11
Last visit: Mon Dec 07, 2009 3:08 am

Terminate a program

Post by faisal7977 »

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
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Terminate a program

Post by jvierra »

You can't really do this with a command line program, Look into the WSH/VBScript "SendKeys" method.
This topic is 14 years and 4 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked