how to kill all batch files except the one currently running

前端 未结 3 1312
余生分开走
余生分开走 2020-12-18 10:23

How can you run a batch file which taskkills all other cmd.exes which are currently running, except for the one that is doing the task kill command?

3条回答
  •  太阳男子
    2020-12-18 11:05

    copy cmd.exe, rename it to a.exe, then use this command in a batch file: start a.exe /k taskkill /f /im cmd.exe

提交回复
热议问题