批处理检测进程,如不存在发送邮件
Posted by he; tagged with bat , 批处理 , 检测进程
每7秒钟检测进程QQ.exe是否存在,如果不存在执行"D:\123.bat"。
D:\123.bat可以是打开一个发送邮件的URL,详见:http://www.512873.com/index.php/archives/344.html
@echo off :loop tasklist | find /i "QQ.exe"&&echo [ %time:~,-3% ]存在进程QQ.exe||start "" "D:\123.bat"&&exit ping -n 7 127.0.0.1>nul goto :loop