Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need to run an .exe, then kill it after ~10 seconds and move to next command in batch file

I am attempting to create a batch file that runs an .exe, but kills said .exe after about 10 seconds (before it completes), then moves on to the next command in the file. Any help would be greatly appreciated.

like image 789
mndrbbr Avatar asked Jun 20 '12 14:06

mndrbbr


1 Answers

You can use this:

start program.exe
ping 127.0.0.1 -n 10
taskkill /im program.exe /f
rem continue here
echo Another command!
like image 57
Bali C Avatar answered Oct 06 '22 00:10

Bali C