可以使用类似以下的bat脚本:@echo offREM 判断sensor.exe进程是否存在 tasklist /nh | find /i "sensor.exe" >nul REM 如果不存在则启动sensor.exe if "%ERRORLEVEL%"=="1" start sensor.exeREM 如果存在则杀死sensor.exe进
bat脚本,判断进程sensor.exe是否存在,不存在则启动exe,存在则重启exe
最新推荐文章于 2023-12-01 15:35:14 发布
可以使用类似以下的bat脚本:@echo offREM 判断sensor.exe进程是否存在 tasklist /nh | find /i "sensor.exe" >nul REM 如果不存在则启动sensor.exe if "%ERRORLEVEL%"=="1" start sensor.exeREM 如果存在则杀死sensor.exe进