Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- :: steamwebhelper Killer by AveYo, all right reserved
- :: copy to a steam.bat inside Steam folder, and launch this instead of steam.exe
- @ECHO OFF
- PUSHD %~dp0
- SET "REPEAT_TASK_EVERY_MINUTES=4"
- :: 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
- :: launch steam.exe and wait for it
- echo INFO: steamwebhelper's are killed every %REPEAT_TASK_EVERY_MINUTES% minutes.
- echo INFO: If you want this prompt hidden, use something like hidebat.vbs in the shortcut target...
- START "" /WAIT Steam.exe
- :: delete task after closing Steam so it only runs while Steam is running
- SCHTASKS /Delete /TN steamwebhelper_killer /F
- :: Set schedule to start in two minutes
- goto :EOF
- :SCHEDULE_TIME
- SET STIME=%TIME: =0%
- SET H=%STIME:~0,2% &SET M=%STIME:~3,2%
- IF [%H:~0,1%]==[0] SET H=%H:~1,1%
- IF [%M:~0,1%]==[0] SET M=%M:~1,1%
- IF %M% GEQ 58 IF %H% GEQ 23 SET "H=00" &SET "M=00"
- IF %M% GEQ 58 IF %H% LEQ 22 SET /A H+=1 &SET "M=00"
- IF %M% LEQ 57 SET /A M+=2
- IF NOT [%H:~0,1%]==[0] IF %H% LEQ 9 SET "H=0%H%"
- IF NOT [%M:~0,1%]==[0] IF %M% LEQ 9 SET "M=0%M%"
- SET SCHEDULETIME=%H%:%M%:00
- goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement