Computing Staff
  • 8

Exiting A Batch File And Killing Child Processes

  • 8

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?

Share

1 Answer

  1. 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

    • 0