Advertisement
Rick0

REMOVE_IE_UPDATE

Mar 30th, 2020
424
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.55 KB | None | 0 0
  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. TITLE VALIDANDO INTERNET EXPLORER
  4. pushd "%~dp0"
  5. if not "%1"=="am_admin" (%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe start -verb runas '%0' am_admin & exit /b)
  6. POPD
  7. SET "X86=%PROGRAMFILES%\Internet Explorer\iexplore.exe"
  8. SET "X64=%PROGRAMFILES(X86)%\Internet Explorer\iexplore.exe"
  9. IF %PROCESSOR_ARCHITECTURE% EQU AMD64 (GOTO X64) ELSE (GOTO X32)
  10. :X32
  11. ::VALIDANDO INTERNET EXPLORER
  12. for /f %%d in ('%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -c "[System.Diagnostics.FileVersionInfo]::GetVersionInfo('%X86%').FileVersion"') do SET VERS=%%d
  13. SET "VER=%VERS:~0,4%"
  14. IF %VER% EQU 8.00 (goto END)
  15. IF %VER% NEQ 8.00 (goto DOWNGRADE)
  16.  
  17. :X64
  18. ::VERIFICA VERSAO DO IE
  19. for /f %%d in ('%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\powershell.exe -c "[System.Diagnostics.FileVersionInfo]::GetVersionInfo('%X64%').FileVersion"') do SET VERS=%%d
  20. SET VER=%VERS:~0,4%
  21. IF %VER% EQU 8.00 (goto END)
  22. IF %VER% NEQ 8.00 (goto DOWNGRADE)
  23.  
  24. :DOWNGRADE
  25. SET "KILL=iexplore.exe,msiexec.exe,pkgmgr.exe"
  26. for %%i in (%KILL%) do (
  27. tasklist | find /i "%%i" && taskkill /im "%%i" /F >nul &CLS
  28. )
  29. ::REMOVENDO INTERNET EXPLORER QUE SEJA DIFERENTE DO 8
  30. FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*%VER%*.mum /c "cmd /c echo Desinstalando o @fname && start /w pkgmgr /up:@fname /quiet /norestart" 2>nul
  31. GOTO END
  32. :END
  33. ::DESATIVANDO WINDOWS UPDATE
  34. SC query "wuauserv" | FIND /i "STOPPED" >nul & IF ERRORLEVEL 1 SC stop "wuauserv" >nul & SC config "wuauserv" start= disabled >nul
  35. POPD
  36. EXIT
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement