pf100

v2.4.1 In-Script Configurator

Jun 28th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.28 KB | None | 0 0
  1. :: Run this In-Script Configurator in the wumt wrapper script folder to test
  2. :: and please give your opinion.
  3. @echo off
  4. mode con cols=85 lines=12
  5. Title In-Script Configurator
  6. Color 1F
  7. ::::::::::::::::::::::::::::
  8. ::Windows Update Service Configurator
  9. Reg query "HKLM\SYSTEM\CurrentControlSet\Services\wuauserv" /v "Start" | find "4" >nul 2>&1
  10. if %errorlevel% == 1 goto wuenable
  11. ::disable windows update
  12. :wudisable
  13. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  14. timeout /t 2 /nobreak >nul 2>&1
  15. "%~dp0wub.exe" /d /p >nul 2>&1
  16. timeout /t 2 /nobreak >nul 2>&1
  17. cls
  18. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ WUMT Wrapper Script Windows Update Service Configurator & echo.
  19. echo ^ ^ ^ ^ ^ ^ ---^>^>^> Windows Update Service is DISABLED and stopped ^(default^) ^<^<^<---
  20. echo. & echo [E]nable Update Service to allow Windows Store.
  21. echo. & echo [C]ontinue script if above Update Service Status is okay...
  22. echo. & echo E[x]it script if you're just verifying or changing the update service status... & echo.
  23. CHOICE /C ECX /M "Your choice?:"
  24. if %errorlevel%==3 (exit)
  25. if %errorlevel%==2 (goto splash)
  26. cls
  27. echo. & echo Please wait while Windows Update Service is enabled...
  28. timeout /t 2 /nobreak >nul 2>&1
  29. ::enable windows update
  30. :wuenable
  31. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  32. timeout /t 2 /nobreak >nul 2>&1
  33. "%~dp0wub.exe" /e >nul 2>&1
  34. timeout /t 2 /nobreak >nul 2>&1
  35. ren "%~dp0wub.exe" wub.exe-backup >nul 2>&1
  36. timeout /t 2 /nobreak >nul 2>&1
  37. cls
  38. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ WUMT Wrapper Script Windows Update Service Configurator & echo.
  39. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ---^>^>^> Windows Update Service is ENABLED ^(for Store^) ^<^<^<---
  40. echo. & echo [D]isable Update Service and only allow to run during updates with script (default).
  41. echo. & echo [C]ontinue script if above Update Service Status is okay...
  42. echo. & echo E[x]it script if you're just verifying or changing the update service status... & echo.
  43. CHOICE /C DCX /M "Your choice?:"
  44. if %errorlevel%==3 (exit)
  45. if %errorlevel%==2 (goto splash)
  46. if %errorlevel%==1 (
  47. cls
  48. echo. & echo Please wait while Windows Update Service is disabled...
  49. timeout /t 2 /nobreak >nul 2>&1
  50. goto wudisable
  51. )
  52. ::::::::::::::::::::::::::::
  53. :splash
  54. echo The In-Script Configurator has finished.
  55. Press a key to exit...
  56. pause > nul
Add Comment
Please, Sign In to add comment