You need to run .exe, and then kill it after ~ 10 seconds and go to the next command in the batch file

I am trying to create a batch file that launches a .exe, but kills the specified .exe after about 10 seconds (before it finishes), and then proceeds to the next command in the file. Any help would be greatly appreciated.

+5
source share
1 answer

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!
+6
source

All Articles