Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: steamwebhelper Killer by AveYo 1.2, all right reserved
- :: When you want to play games without lag, cpu, memory spikes caused by steamwebhelper, launch this.
- :: It will run at all times, until you use "Stop steamwebhelper killer.bat" from http://pastebin.com/download.php?i=jQ5M3746
- :: Changes from 1.1: removed dependency on steam.exe process
- @ECHO OFF
- SET "REPEAT_TASK_EVERY_MINUTES=4"
- :: Gain admin rights
- if "%1"=="_SELF_ADMIN" goto :_START
- echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\~1337run.vbs"
- echo UAC.ShellExecute "%~s0", "_SELF_ADMIN %~sdp0", "", "runas", 1 >> "%temp%\~1337run.vbs"
- CALL CSCRIPT //nologo "%temp%\~1337run.vbs" &DEL /F /Q "%temp%\~1337run.vbs" &EXIT /B
- :_START
- SHIFT
- ::
- :: Set task to start two minutes later. needed because a system task cannot be started ondemand with the SCHTASKS /Run command :(
- CALL :SCHEDULE_TIME
- :: create task to kill steamwebhelper's minions every 4 minutes - using system account so the taskkill cmd prompt is not visible
- CALL SCHTASKS /create /ru "System" /TN steamwebhelper_killer /TR "TASKKILL /F /IM steamwebhelper.exe /T" /SC MINUTE /MO %REPEAT_TASK_EVERY_MINUTES% /ST %SCHEDULETIME% /F
- echo INFO: steamwebhelper's are killed every %REPEAT_TASK_EVERY_MINUTES% minutes starting %SCHEDULETIME%.
- echo INFO: If you want this prompt hidden, use something like hidebat.vbs in the shortcut target...
- rem :: launch steam.exe and wait for it
- rem FOR /F "tokens=3*" %%I IN ('REG QUERY "HKCU\SOFTWARE\Valve\Steam"^|FINDSTR /I /L "SteamExe"') DO SET "STEAMEXE=%%~I"
- rem SET "STEAMEXE=%STEAMEXE:/=\%"
- rem START "" /WAIT "%STEAMEXE%" -silent
- :: delete task after closing Steam so it only runs while Steam is running
- rem SCHTASKS /Delete /TN steamwebhelper_killer /F
- :: Set schedule to start in two minutes
- goto :EOF
- :SCHEDULE_TIME
- FINDSTR "'~1337ti%skip%m" "%~f0">"%temp%\~1337tim.vbs"
- CALL CSCRIPT //nologo "%temp%\~1337tim.vbs" >"%temp%\~1337tim.cmd"
- CALL "%temp%\~1337tim.cmd" &DEL /F /Q "%temp%\~1337tim.vbs"
- DEL /F /Q "%temp%\~1337tim.cmd"
- goto :EOF
- sNow = DateAdd("n", 2, Now) '~1337tim
- sHour = Hour(sNow) '~1337tim
- sMinute = Minute(sNow) '~1337tim
- If sHour < 10 Then sHour = 0 & sHour '~1337tim
- If sMinute < 10 Then sMinute = 0 & sMinute '~1337tim
- WScript.echo "SET SCHEDULETIME=" & sHour & ":" & sMinute & ":00" '~1337tim
- rem SET "STIME=%TIME: =0%"
- rem SET H=%STIME:~0,2% &SET "M=%STIME:~3,2%"
- rem IF [%H:~0,1%]==[0] SET "H=%H:~1,1%"
- rem IF [%M:~0,1%]==[0] SET "M=%M:~1,1%"
- rem IF %M% GEQ 58 IF %H% GEQ 23 SET "H=00" &SET "M=00"
- rem IF %M% GEQ 58 IF %H% LEQ 22 SET /A "H+=1" &SET "M=00"
- rem IF %M% LEQ 57 SET /A "M+=2"
- rem IF NOT [%H:~0,1%]==[0] IF %H% LEQ 9 SET "H=0%H%"
- rem IF NOT [%M:~0,1%]==[0] IF %M% LEQ 9 SET "M=0%M%"
- rem SET "SCHEDULETIME=%H%:%M%:00"
- rem goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement