Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- mode con cols=85 lines=20
- Color 1F
- Title Windows 10 Update Control Wrapper Script 2.6.0 uninstaller
- ::Elevate permissions
- 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
- ::Start
- cd /d "%~dp0"
- echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ WUMT Wrapper Script Uninstaller
- echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ If you continue, and have no other method of controlling
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ updates, UPDATES MAY START RIGHT AWAY.
- echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ DISABLE THE INTERNET FIRST? Press (Y)es or(N).
- echo. & echo ^ If you select (Y), "Network Connections" in the Control Panel will open so you can
- echo ^ temporarily disable your Internet connection.
- echo. & echo ^ Whether you select (Y) or (N), the next script window will stay open allowing you
- echo ^ to fully uninstall the script and all associated changes that were made when you
- echo ^ first ran the script.
- CHOICE /C YN /M "Your choice?:" >nul 2>&1
- if %errorlevel%==2 (goto nodisablenet)
- %systemroot%\System32\control.exe ncpa.cpl
- :nodisablenet
- cls
- echo. & echo. & echo. & echo. & echo. & echo. & echo.
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I have to ask if you're really sure?
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Press (Y)es to uninstall, (N)o or
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ close window to cancel...
- CHOICE /C YN /M "Your choice?:" >nul 2>&1
- if %errorlevel%==2 (exit)
- cls
- set s32=%systemroot%\System32
- ::::::::::::::::::::::::::::::::::
- ::restore rempl folder permissions
- takeown /f "%ProgramFiles%\rempl" /a >nul 2>&1
- icacls "%ProgramFiles%\rempl" /reset >nul 2>&1
- icacls "%ProgramFiles%\rempl" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
- ::::::::::::::::::::::::::::::::::
- ::restore rempl file permissions
- for %%? in ("%ProgramFiles%\rempl\*") do (
- takeown /f "%%?" /a >nul 2>&1
- icacls "%%?" /q /c /reset >nul 2>&1
- icacls "%%?" /setowner *S-1-5-18 >nul 2>&1
- )
- ::::::::::::::::::::::::::::::::::
- schtasks /delete /tn WDU >nul /f 2>&1
- schtasks /delete /tn Wub_task /f >nul 2>&1
- schtasks /Delete /Tn \Microsoft\WuWrapperScript\WDU /f >nul 2>&1
- schtasks /Delete /Tn \Microsoft\WuWrapperScript\Wub_task /f >nul 2>&1
- rmdir %SystemDrive%\Windows\System32\Tasks\Microsoft\WuWrapperScript /s /q >nul 2>&1
- rem timeout /t 3 >nul 2>&1
- nsudocx64 -ShowWindowMode:Hide -Wait -U:T -P:E reg delete "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Schedule\TaskCache\Tree\Microsoft\WuWrapperScript" /f >nul 2>&1
- ::::::::::::::::::::::::::::::::::
- ::Restore Language Components Installer tasks to defaults
- takeown /f "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /a >nul 2>&1
- icacls "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /q /c /t /reset >nul 2>&1
- for %%? in ("%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*") do schtasks /change /tn "Microsoft\Windows\LanguageComponentsInstaller\%%~nx?" /enable >nul 2>&1
- schtasks /change /tn "Microsoft\Windows\LanguageComponentsInstaller\Uninstallation" /disable >nul 2>&1
- icacls "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /setowner *S-1-5-18 >nul 2>&1
- ::::::::::::::::::::::::::::::::::
- ::Restore Windows Update tasks to defaults
- takeown /f "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /a >nul 2>&1
- icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /q /c /t /reset >nul 2>&1
- for %%? in ("%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*") do schtasks /change /tn "Microsoft\Windows\WindowsUpdate\%%~nx?" /enable >nul 2>&1
- icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /setowner *S-1-5-18 >nul 2>&1
- ::::::::::::::::::::::::::::::::::
- ::Restore default permissions to Update Hijacker files disabled by script
- set s32list=EOSNotify.exe WaaSMedic.exe WaasMedicSvc.dll WaaSMedicPS.dll WaaSAssessment.dll UsoClient.exe
- set s32list=%s32list% SIHClient.exe MusNotificationUx.exe MusNotification.exe osrss.dll
- ::If "s32list" files were renamed by script, restore original file names
- for %%# in (%s32list%) do (
- ren "%s32%\%%#"-backup "%%#" >nul 2>&1
- if exist "%s32%\%%#" del "%s32%\%%#"-backup /f /q >nul 2>&1
- )
- ::Now restore default permissions for Update Hijacker files
- for %%# in (%s32list%) do (
- takeown /f "%s32%\%%#" /a >nul 2>&1
- icacls "%s32%\%%#" /reset >nul 2>&1
- icacls "%s32%\%%#" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
- )
- ::restore Update Assistant folder permissions
- takeown /f "%systemroot%\UpdateAssistant" /a >nul 2>&1
- icacls "%systemroot%\UpdateAssistant" /reset >nul 2>&1
- icacls "%systemroot%\UpdateAssistant" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
- takeown /f "%systemroot%\UpdateAssistantV2" /a >nul 2>&1
- icacls "%systemroot%\UpdateAssistantV2" /reset >nul 2>&1
- icacls "%systemroot%\UpdateAssistantV2" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
- ::::::::::::::::::::::::::::::::::
- "%~dp0wub.exe" /e >nul 2>&1
- timeout /t 3 >nul 2>&1
- cls
- if not exist "%~dp0unins000.exe" (
- echo. & echo. & echo. & echo. & echo. & echo.
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : WUMT Wrapper Script uninstalled. :
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : Press any key to exit... :
- echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
- pause > nul
- exit
- )
- "%~dp0unins000.exe" /silent /norestart
Advertisement
Add Comment
Please, Sign In to add comment