- @echo off
- :1
- for /f "delims=" %%a in ('wmic PROCESS where "name='qq.exe'" get ExecutablePath^,ProcessId^,WorkingSetSize /value^|find "="') do set "%%a"
- >"%tmp%\$$.vbs" echo;if %WorkingSetSize%/1048576 ^> 800 then:WSH.echo 1:else:WSH.echo 0
- echo;%WorkingSetSize% B
- for /f %%a in ('cscript -nologo -e:vbscript "%tmp%\$$.vbs"') do set check=%%a
- if "%check%" equ "1" (
- taskkill /f /pid %ProcessId% /t
- start "" "%ExecutablePath%"
- )
- >nul ping /n 2 127.1
- goto :1
复制代码
|