Advertisement
Guest User

Untitled

a guest
Mar 7th, 2017
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. :: steamwebhelper Killer by AveYo, all right reserved
  2. :: copy to a steam.bat inside Steam folder, and launch this instead of steam.exe
  3.  
  4. @ECHO OFF
  5. PUSHD %~dp0
  6. SET "REPEAT_TASK_EVERY_MINUTES=2"
  7. :: Set task to start two minutes later. needed because a system task cannot be started ondemand with the SCHTASKS /Run command :(
  8. CALL :SCHEDULE_TIME
  9. :: create task to kill steamwebhelper's minions every 4 minutes - using system account so the taskkill cmd prompt is not visible
  10. 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
  11. :: launch steam.exe and wait for it
  12. echo INFO: steamwebhelper's are killed every %REPEAT_TASK_EVERY_MINUTES% minutes.
  13. echo INFO: If you want this prompt hidden, use something like hidebat.vbs in the shortcut target...
  14. START "" /WAIT Steam.exe
  15. :: delete task after closing Steam so it only runs while Steam is running
  16. SCHTASKS /Delete /TN steamwebhelper_killer /F
  17.  
  18.  
  19. :: Set schedule to start in two minutes
  20. goto :EOF
  21. :SCHEDULE_TIME
  22. SET STIME=%TIME: =0%
  23. SET H=%STIME:~0,2% &SET M=%STIME:~3,2%
  24. IF [%H:~0,1%]==[0] SET H=%H:~1,1%
  25. IF [%M:~0,1%]==[0] SET M=%M:~1,1%
  26. IF %M% GEQ 58 IF %H% GEQ 23 SET "H=00" &SET "M=00"
  27. IF %M% GEQ 58 IF %H% LEQ 22 SET /A H+=1 &SET "M=00"
  28. IF %M% LEQ 57 SET /A M+=2
  29. IF NOT [%H:~0,1%]==[0] IF %H% LEQ 9 SET "H=0%H%"
  30. IF NOT [%M:~0,1%]==[0] IF %M% LEQ 9 SET "M=0%M%"
  31. SET SCHEDULETIME=%H%:%M%:00
  32. goto :EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement