@echo off tasklist | find /i "speedfan.exe" if "%errorlevel%"=="1" (goto f) else (goto e) :f echo [ %time:~,-3% ]不存在进程speedfan.exe start "" "D:\SpeedFan\speedfan.exe" exit :e echo [ %time:~,-3% ]存在进程speedfan.exe taskkill /f /im cmd.exe