bat检测进程是否关闭,关闭就自动重启进程
作者:lcy 日期:2017-12-15
@echo off & color 0e
:start
cls
echo 正在检测 test.exe 进程...
tasklist /nh|find /i "LocoyPlatform.exe"
if ERRORLEVEL 1 (start "" "D:\test.exe") else (
echo ok
)
ping /n 10 127.0.0.1 >nul
goto start
:start
cls
echo 正在检测 test.exe 进程...
tasklist /nh|find /i "LocoyPlatform.exe"
if ERRORLEVEL 1 (start "" "D:\test.exe") else (
echo ok
)
ping /n 10 127.0.0.1 >nul
goto start
评论: 0 | 引用: 0 | 查看次数: -
发表评论