批处理,如何监控程序是否有运行?

2025-05-08 17:00:17
推荐回答(1个)
回答1:

tasklist /nh|find /i "ABC.exe"
if ERRORLEVEL 1 (start E:\SS\start\ABC.exe) else (echo 程序已运行 exit)pause