batch bat monitor program running

Through bat monitoring program operation, software monitoring/control can be realized, such as software abnormality or problems, the program can be automatically restarted

@echo off
:begin
set Program=”Bypass.exe”
tasklist -v | findstr %Program% > NUL
if ErrorLevel 1 (
echo %date%+ %time% >> log.txt
echo “not running”
d:
cd d: \Software\Tools\Bypass_1.13.92\Bypass
Bypass.exe
)
goto begin
pause

You can change the file name according to the above picture, then save the bit bat yourself, and run it~!

Leave a Comment