pf100

WWS Configurator 2.3.6

May 30th, 2018
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.80 KB | None | 0 0
  1. @echo off
  2. Color 1F
  3. Title WUMT Wrapper Script Configurator 2.3.6
  4. ::::::::::::::::::::::::::::
  5. set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
  6. fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
  7. :: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
  8. If "%1"=="%params%" (echo Elevating UAC for Administrator Privileges failed&echo Right click on the script and select 'Run as administrator'&echo Press any key to exit...&pause>nul 2>&1&exit)
  9. cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
  10. :GotPrivileges
  11. ::::::::::::::::::::::::::::
  12. cls
  13. echo Welcome to WUMT Wrapper Script Configurator & echo.
  14. sc query | find /i "wuauserv" > nul & if errorlevel 1 (
  15. echo Windows Update Service is not running.
  16. ) else (
  17. echo Windows Update Service is running.)
  18. echo. & echo Close window to leave Windows Update Service status unchanged, or
  19. echo.
  20. echo [D]isable Update Service and only allow to run during manual updates (default).
  21. echo.
  22. echo [E]nable Update Service to always allow Windows Store at any time.
  23. echo.
  24. CHOICE /C DE /M "YOUR CHOICE ?:"
  25. if %errorlevel%==2 (
  26. "%~dp0wub.exe" /e >nul 2>&1
  27. ren "%~dp0wub.exe" wub.exe-backup >nul 2>&1
  28. echo. & echo Windows Update Service now enabled and running and it won't be manipulated by wrapper script.
  29. ) else (
  30. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  31. "%~dp0wub.exe" /d /p >nul 2>&1
  32. echo. & echo Windows Update Service disabled except for manual update checks with script.)
  33. echo To reverse changes just run script again.
  34. echo Press any key to exit...
  35. pause > nul
Advertisement
Add Comment
Please, Sign In to add comment