Advertisement
pf100

v2.5.4 Uninstaller_undo-all-script-changes.cmd

Oct 6th, 2018
200
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.72 KB | None | 0 0
  1. @echo off
  2. mode con cols=85 lines=12
  3. Color 1F
  4. Title WUMT Wrapper Script 2.5.4 uninstaller
  5. ::Elevate permissions
  6. set "params=Problem_with_elevating_UAC_for_Administrator_Privileges"&if exist "%temp%\getadmin.vbs" del "%temp%\getadmin.vbs"
  7. fsutil dirty query %systemdrive% >nul 2>&1 && goto :GotPrivileges
  8. :: The following test is to avoid infinite looping if elevating UAC for Administrator Privileges failed
  9. 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)
  10. cmd /u /c echo Set UAC = CreateObject^("Shell.Application"^) : UAC.ShellExecute "%~0", "%params%", "", "runas", 1 > "%temp%\getadmin.vbs"&cscript //nologo "%temp%\getadmin.vbs"&exit
  11. :GotPrivileges
  12. ::Start
  13. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ WUMT Wrapper Script Uninstaller
  14. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ If you continue, and have no other method of controlling
  15. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ updates, updates may start right away.
  16. rem echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^
  17. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Do you want to open "network connections" now so you can
  18. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ disable the internet first? If yes press (Y) (return to
  19. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ this window after you're done), if no press (N).
  20. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Press (Y)es or (N)o
  21. CHOICE /C YN /M "Your choice?:" >nul 2>&1
  22. if %errorlevel%==2 (goto nodisablenet)
  23. %systemroot%\System32\control.exe ncpa.cpl
  24. :nodisablenet
  25. cls
  26. echo. & echo. &
  27. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I have to ask if you're really sure?
  28. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Press (Y)es to uninstall, (N)o or
  29. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ close window to cancel...
  30. CHOICE /C YN /M "Your choice?:" >nul 2>&1
  31. if %errorlevel%==2 (exit)
  32. cls
  33. for %%? in ("%ProgramFiles%\rempl\*") do (
  34. takeown /f "%%?" /a >nul 2>&1
  35. icacls "%%?" /q /c /reset >nul 2>&1
  36. icacls "%%?" /setowner *S-1-5-18 >nul 2>&1
  37. )
  38. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  39. schtasks /delete /tn "wub_task" /f >nul 2>&1
  40. schtasks /delete /tn "WDU" /f >nul 2>&1
  41. del "%~dp0WDU.cmd" /f /q >nul 2>&1
  42. ::::::::::::::::::::::::::::::::::
  43. ::Restore Language Components Installer tasks to defaults
  44. takeown /f "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /a >nul 2>&1
  45. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /q /c /t /reset >nul 2>&1
  46. for %%? in ("%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*") do schtasks /change /tn "Microsoft\Windows\LanguageComponentsInstaller\%%~nx?" /enable >nul 2>&1
  47. schtasks /change /tn "Microsoft\Windows\LanguageComponentsInstaller\Uninstallation" /disable >nul 2>&1
  48. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\LanguageComponentsInstaller\*" /setowner *S-1-5-18 >nul 2>&1
  49. ::::::::::::::::::::::::::::::::::
  50. ::Restore Windows Update tasks to defaults
  51. takeown /f "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /a >nul 2>&1
  52. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /q /c /t /reset >nul 2>&1
  53. for %%? in ("%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*") do schtasks /change /tn "Microsoft\Windows\WindowsUpdate\%%~nx?" /enable >nul 2>&1
  54. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\*" /setowner *S-1-5-18 >nul 2>&1
  55. ::::::::::::::::::::::::::::::::::
  56. ::Restore default permissions to Update Hijacker files disabled by script
  57. set s32list=EOSNotify.exe WaaSMedic.exe WaasMedicSvc.dll WaaSMedicPS.dll WaaSAssessment.dll UsoClient.exe
  58. set s32list=%s32list% SIHClient.exe MusNotificationUx.exe MusNotification.exe osrss.dll
  59. set s32=%systemroot%\System32
  60. ::If "s32list" files were renamed by script, restore original file names
  61. for %%# in (%s32list%) do (
  62. ren "%s32%\%%#"-backup "%%#" >nul 2>&1
  63. if exist "%s32%\%%#" del "%s32%\%%#"-backup /f /q >nul 2>&1
  64. )
  65. ::Now restore default permissions for Update Hijacker files
  66. for %%# in (%s32list%) do (
  67. takeown /f "%s32%\%%#" /a >nul 2>&1
  68. icacls "%s32%\%%#" /reset >nul 2>&1
  69. icacls "%s32%\%%#" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
  70. )
  71. ::::::::::::::::::::::::::::::::::
  72. "%~dp0wub.exe" /e >nul 2>&1
  73. cls
  74. if not exist "%~dp0unins000.exe" (
  75. echo.
  76. echo.
  77. echo.
  78. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
  79. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : WUMT Wrapper Script uninstalled. :
  80. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : Press any key to exit... :
  81. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
  82. pause > nul
  83. exit
  84. )
  85. "%~dp0unins000.exe" /silent /norestart
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement