当一个进程结束时,自动运行另一程序,批处理该怎么写?
来源:百度知道 编辑:UC知道 时间:2024/06/17 22:38:30
想搞个批处理,当我游戏挂机出错跳出时,能自动运行关机命令,大侠们帮帮忙
:a
ping 127.1 -n 20 >nul
tasklist|findstr /i "qq.exe" || shutdown -s -f -t 120
cls
goto :a
上面代码已经测试通过(xp或2003)
当进程中没有qq.exe时自动执行shutdown 进行120关机倒计时