Dim WshShell, GamePath
GamePath="""D:\Program Files\Tencent\QQ\Bin\QQ.exe"""
Set WshShell=WScript.CreateObject("WScript.Shell")
do
Set wmiService = GetObject("winmgmts:\\.\root\cimv2")
Set wmiObjects = wmiService.ExecQuery("SELECT * FROM Win32_process where name='QQ.exe'")
if wmiObjects.count > 0 then
wscript.sleep 1000*60*1
elseif wmiObjects.count = 0 then
WshShell.Run GamePath,2
end if
loop
@echo off
:QQ
tasklist |find /i "qq.exe" ||"D:\Tencent\QQ\Bin\QQ.exe"
echo wscript.sleep 8000 >S.vbs
s.vbs>nul & del S.vbs
goto QQ
@echo off
:begin
tasklist |findstr /i "qq.exe" ||"%programfiles%\tencent\qq\bin\qq.exe"
ping 127.1 -n 60>nul
goto begin