Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- Color 1F
- Title WUMT Wrapper Script Configurator 2.3.7
- ::::::::::::::::::::::::::::
- set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
- fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
- :: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
- 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)
- cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
- :GotPrivileges
- ::::::::::::::::::::::::::::
- :refresh
- cls
- echo Welcome to WUMT Wrapper Script Configurator & echo.
- sc query | find /i "wuauserv" > nul & if errorlevel 1 (
- echo [44;93m---^>^>^> Windows Update Service is NOT running ^<^<^<---[44;97m
- ) else (
- echo [44;93m---^>^>^> Windows Update Service IS running ^<^<^<---[44;97m)
- echo.
- echo -[D]isable Update Service and only allow to run during updates with script (default).
- echo.
- echo -[E]nable Update Service to allow Windows Store.
- echo.
- echo E[x]it Configurator.
- echo.
- CHOICE /C DEX /M "YOUR CHOICE?:"
- if %errorlevel%==3 (exit)
- if %errorlevel%==2 (
- "%~dp0wub.exe" /e >nul 2>&1
- ren "%~dp0wub.exe" wub.exe-backup >nul 2>&1
- ping 127.0.0.1 -n 1 -w 500> nul
- echo. & goto refresh
- ) else (
- ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
- "%~dp0wub.exe" /d /p >nul 2>&1
- ping 127.0.0.1 -n 1 -w 500> nul
- echo. & goto refresh)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement