计数进程守护
@echo off
set a=1
set b=1
echo 开始进程守护
:start
choice /t 10 /d y /n>nul
echo 开始第%a%次检查
tasklist|find /i “wechat.exe”
if %errorlevel%==0 (
echo 已启动
set/a a+=1
) else (
start D:\WeChat\WeChat.exe
set/a a+=1
set/a b+=1
echo 第%b%次打开程序
)
goto start