pf100

v2.4.5 Uninstaller.cmd

Jul 23rd, 2018
224
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. @echo off
  2. mode con cols=85 lines=12
  3. Color 1F
  4. Title WUMT Wrapper Script 2.4.5 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
  15. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ method of controlling updates, updates
  16. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ may start right away.
  17. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Press a key to uninstall WUMT Wrapper Script.
  18. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ or close window to cancel...
  19. pause > nul
  20. cls
  21. echo. & echo. &
  22. echo. & echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ I have to ask if you're really sure?
  23. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ Press a key to uninstall
  24. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ or close window to back out now...
  25. pause > nul
  26. cls
  27. ren "%ProgramFiles%\rempl-backup" rempl >nul 2>&1
  28. ren "%~dp0wub.exe-backup" wub.exe >nul 2>&1
  29. schtasks /delete /tn "wub_task" /f >nul 2>&1
  30. schtasks /delete /tn "WDU" /f >nul 2>&1
  31. del "%~dp0WDU.cmd" /f /q >nul 2>&1
  32. ::::::::::::::::::::::::::::::::::
  33. takeown /f "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\Scheduled Start" /a >nul 2>&1
  34. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\Scheduled Start" /reset >nul 2>&1
  35. schtasks /change /tn "\Microsoft\Windows\WindowsUpdate\Scheduled Start" /enable >nul 2>&1
  36. icacls "%systemroot%\System32\Tasks\Microsoft\Windows\WindowsUpdate\Scheduled Start" /setowner *S-1-5-18 >nul 2>&1
  37. ::::::::::::::::::::::::::::::::::
  38. ::Restore default permissions to update hijacker files disabled by script
  39. set s32list=EOSNotify.exe WaaSMedic.exe WaasMedicSvc.dll WaaSMedicPS.dll WaaSAssessment.dll UsoClient.exe pushtoinstall.dll
  40. set s32list=%s32list% SIHClient.exe MusNotificationUx.exe MusNotification.exe osrss.dll InstallServiceTasks.dll
  41. set s32list=%s32list% InstallService.dll compattelrunner.exe
  42. set s32=%systemroot%\System32
  43. for %%# in (%s32list%) do (
  44. takeown /f "%s32%\%%#" /a >nul 2>&1
  45. icacls "%s32%\%%#" /reset >nul 2>&1
  46. icacls "%s32%\%%#" /setowner *S-1-5-80-956008885-3418522649-1831038044-1853292631-2271478464 >nul 2>&1
  47. )
  48. ::::::::::::::::::::::::::::::::::
  49. "%~dp0wub.exe" /e >nul 2>&1
  50. cls
  51. if not exist "%~dp0unins000.exe" (
  52. echo.
  53. echo.
  54. echo.
  55. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
  56. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : WUMT Wrapper Script uninstalled. :
  57. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ : Press any key to exit... :
  58. echo ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ^ ::::::::::::::::::::::::::::::::::::
  59. pause > nul
  60. exit
  61. )
  62. "%~dp0unins000.exe" /silent /norestart
Advertisement
Add Comment
Please, Sign In to add comment