Exiting a Batch file and killing child processes

December 21, 2011 at 11:00:35
Specs: Windows 7
I have a batch file which starts three child processes, tests them, and exits. My problem is that although the parent exits, the child processes remain. Is there a way, using shell, to kill the child processes when I exit the batch file?

See More: Exiting a Batch file and killing child processes

Report •


#1
December 21, 2011 at 14:22:46
TASKKILL /f /im process1.exe /im process2.exe /im process3.exe

You'll have to make your parent batch file run through the above script though, you wouldn't be able to click close and they disappear.
Hope that helps


Report •
Related Solutions


Ask Question