Advertisement
pf100

Configurator.cmd v2.3.7

Jun 22nd, 2018
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.64 KB | None | 0 0
  1. @echo off
  2. Color 1F
  3. Title WUMT Wrapper Script Configurator 2.3.7
  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. :refresh
  13. cls
  14. echo Welcome to WUMT Wrapper Script Configurator & echo.
  15. sc query | find /i "wuauserv" > nul & if errorlevel 1 (
  16. echo ---^>^>^> Windows Update Service is NOT running ^<^<^<---
  17. ) else (
  18. echo ---^>^>^> Windows Update Service IS running ^<^<^<---)
  19. echo.
  20. echo -[D]isable Update Service and only allow to run during updates with script (default).
  21. echo.
  22. echo -[E]nable Update Service to allow Windows Store.
  23. echo.
  24. echo E[x]it Configurator.
  25. echo.
  26. CHOICE /C DEX /M "YOUR CHOICE?:"
  27. if %errorlevel%==3 (exit)
  28. if %errorlevel%==2 (
  29. "%~dp0wub.exe" /e >nul 2>&1
  30. ren "%~dp0wub.exe" wub.exe-backup >nul 2>&1
  31. ping 127.0.0.1 -n 1 -w 500> nul
  32. echo. & goto refresh
  33. ) else (
  34. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  35. "%~dp0wub.exe" /d /p >nul 2>&1
  36. ping 127.0.0.1 -n 1 -w 500> nul
  37. echo. & goto refresh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement