一下是一段脚本用于检查某个进程是否存在
@echo off :star ping 127.1 -n 5 >nul 2>nul tasklist|findstr /i "a.exe" > nul if errorlevel 1 ( echo "[%date% %time%] a.exe **没有找到**" ) else ( echo "[%date% %time%] a.exe ==正在运行==" ) tasklist|findstr /i "b.exe" > nul if errorlevel 1 ( echo "[%date% %time%] b.exe **没有找到**" ) else ( echo "[%date% %time%] b.exe ==正在运行==") echo ------------------------------------- goto star