SHOW:
|
|
- or go back to the newest paste.
1 | - | :: steamwebhelper Killer by AveYo, all right reserved |
1 | + | :: steamwebhelper Killer by AveYo 1.1, all right reserved |
2 | - | :: copy to a steam.bat inside Steam folder, and launch this instead of steam.exe |
2 | + | :: Launch this instead of steam.exe when you want to play games without lag, cpu, memory spikes caused by steamwebhelper |
3 | @ECHO OFF | |
4 | ||
5 | - | PUSHD %~dp0 |
5 | + | |
6 | ||
7 | :: Gain admin rights | |
8 | if "%1"=="_SELF_ADMIN" goto :_START | |
9 | echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\~1337run.vbs" | |
10 | echo UAC.ShellExecute "%~s0", "_SELF_ADMIN %~sdp0", "", "runas", 1 >> "%temp%\~1337run.vbs" | |
11 | CALL CSCRIPT //nologo "%temp%\~1337run.vbs" &DEL /F /Q "%temp%\~1337run.vbs" &EXIT /B | |
12 | - | echo INFO: steamwebhelper's are killed every %REPEAT_TASK_EVERY_MINUTES% minutes. |
12 | + | :_START |
13 | SHIFT | |
14 | - | START "" /WAIT Steam.exe |
14 | + | :: |
15 | ||
16 | :: Set task to start two minutes later. needed because a system task cannot be started ondemand with the SCHTASKS /Run command :( | |
17 | CALL :SCHEDULE_TIME | |
18 | :: create task to kill steamwebhelper's minions every 4 minutes - using system account so the taskkill cmd prompt is not visible | |
19 | 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 | |
20 | echo INFO: steamwebhelper's are killed every %REPEAT_TASK_EVERY_MINUTES% minutes starting %SCHEDULETIME%. | |
21 | echo INFO: If you want this prompt hidden, use something like hidebat.vbs in the shortcut target... | |
22 | - | SET STIME=%TIME: =0% |
22 | + | |
23 | - | SET H=%STIME:~0,2% &SET M=%STIME:~3,2% |
23 | + | FOR /F "tokens=3*" %%I IN ('REG QUERY "HKCU\SOFTWARE\Valve\Steam"^|FINDSTR /I /L "SteamExe"') DO SET "STEAMEXE=%%~I" |
24 | - | IF [%H:~0,1%]==[0] SET H=%H:~1,1% |
24 | + | SET "STEAMEXE=%STEAMEXE:/=\%" |
25 | - | IF [%M:~0,1%]==[0] SET M=%M:~1,1% |
25 | + | START "" /WAIT "%STEAMEXE%" |
26 | - | IF %M% GEQ 58 IF %H% GEQ 23 SET "H=00" &SET "M=00" |
26 | + | |
27 | - | IF %M% GEQ 58 IF %H% LEQ 22 SET /A H+=1 &SET "M=00" |
27 | + | |
28 | - | IF %M% LEQ 57 SET /A M+=2 |
28 | + | |
29 | - | IF NOT [%H:~0,1%]==[0] IF %H% LEQ 9 SET "H=0%H%" |
29 | + | |
30 | - | IF NOT [%M:~0,1%]==[0] IF %M% LEQ 9 SET "M=0%M%" |
30 | + | |
31 | - | SET SCHEDULETIME=%H%:%M%:00 |
31 | + | |
32 | - | goto :EOF |
32 | + | FINDSTR "'~1337ti%skip%m" "%~f0">"%temp%\~1337tim.vbs" |
33 | CALL CSCRIPT //nologo "%temp%\~1337tim.vbs" >"%temp%\~1337tim.cmd" | |
34 | CALL "%temp%\~1337tim.cmd" &DEL /F /Q "%temp%\~1337tim.vbs" | |
35 | DEL /F /Q "%temp%\~1337tim.cmd" | |
36 | goto :EOF | |
37 | sNow = DateAdd("n", 2, Now) '~1337tim | |
38 | sHour = Hour(sNow) '~1337tim | |
39 | sMinute = Minute(sNow) '~1337tim | |
40 | If sHour < 10 Then sHour = 0 & sHour '~1337tim | |
41 | If sMinute < 10 Then sMinute = 0 & sMinute '~1337tim | |
42 | WScript.echo "SET SCHEDULETIME=" & sHour & ":" & sMinute & ":00" '~1337tim | |
43 | ||
44 | ||
45 | rem SET "STIME=%TIME: =0%" | |
46 | rem SET H=%STIME:~0,2% &SET "M=%STIME:~3,2%" | |
47 | rem IF [%H:~0,1%]==[0] SET "H=%H:~1,1%" | |
48 | rem IF [%M:~0,1%]==[0] SET "M=%M:~1,1%" | |
49 | rem IF %M% GEQ 58 IF %H% GEQ 23 SET "H=00" &SET "M=00" | |
50 | rem IF %M% GEQ 58 IF %H% LEQ 22 SET /A "H+=1" &SET "M=00" | |
51 | rem IF %M% LEQ 57 SET /A "M+=2" | |
52 | rem IF NOT [%H:~0,1%]==[0] IF %H% LEQ 9 SET "H=0%H%" | |
53 | rem IF NOT [%M:~0,1%]==[0] IF %M% LEQ 9 SET "M=0%M%" | |
54 | rem SET "SCHEDULETIME=%H%:%M%:00" | |
55 | rem goto :EOF |