Downgrade IE10&11 to IE9

Uninstalls IE10 and/or IE11 via KB numbers.
To use:
copy file to your desktop,
right-click and select "Run as Administrator"

@ECHO OFF

GOTO:MAIN

:: Sets environment variables, then releases
:SET_VAR
 SET PAUSE_ON_ERROR=true
 SET PAUSE_ON_EXIT=true
 GOTO:EOF

:: Loops through environment variables setting them to null, then releases
:: Limit of 9 parameters may be reset per CALL :CLR_VAR
:CLR_VAR
 IF "%~1" EQU "" GOTO:EOF
 SET %~1=<nul
 SHIFT
 GOTO:CLR_VAR

:: Prints an error and pauses script execution, then releases
:ERROR
 ECHO %~1
 IF "%PAUSE_ON_ERROR%" EQU "true" PAUSE
 GOTO:EOF

:: Disables IE 10 & 11 from being deployed via Windows Updates 
:DISABLE_IE
 ECHO Checking registry configuration for IE %~1
 REG QUERY "HKLM\SOFTWARE\Microsoft\Internet Explorer\Setup\%~1" /v %~2>nul || (
  ECHO --Adding registry key for HKLM\...\%~2
  REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer\Setup\%~1" /v %~2 /t REG_DWORD /d 1 /f>nul || (
   CALL:ERROR "EXECUTION ERROR: Unable to modify the registry!"
   GOTO:EOF
   )
  ECHO Blocked IE %~1 Windows Update
  ECHO.
  GOTO:EOF
  )
 ECHO --A registry key already exists for HKLM\...\%~2
 ECHO.
 GOTO:EOF

:: Uninstalls Windows Updates by KB number
:REMOVE_KB
 ECHO. Removing KB%~1
 wusa /uninstall /kb:%~1 /quiet /norestart
 GOTO:EOF

:UNINSTALL_IE
 IF "%~1" EQU "10.0" (
  ECHO Uninstalling Internet Explorer %~1
  CALL:REMOVE_KB "2964358"
  CALL:REMOVE_KB "2925418"
  CALL:REMOVE_KB "2909210"
  CALL:REMOVE_KB "2718695"
  GOTO:EOU
  )
 IF "%~1" EQU "11.0" (
  ECHO Uninstalling Internet Explorer %~1
  CALL:REMOVE_KB "2929437"
  CALL:REMOVE_KB "2936068"
  CALL:REMOVE_KB "2964444"
  CALL:REMOVE_KB "2925418"
  CALL:REMOVE_KB "2909921"
  CALL:REMOVE_KB "2909210"
  CALL:REMOVE_KB "2898785"
  CALL:REMOVE_KB "2841134"
  GOTO:EOU
  )
 :EOU
 ECHO. Please restart this PC to complete the downgrade
 GOTO:EOF

:: Main method - completes tasks, then exits
:MAIN
 CALL:SET_VAR
 CALL:DISABLE_IE "10.0" "DoNotAllowIE10"
 CALL:DISABLE_IE "11.0" "DoNotAllowIE11"
 REG QUERY "HKLM\Software\Microsoft\Internet Explorer" /v svcVersion | FINDSTR /I /R ^9[.][0-9]*[.][0-9]*[.][0-9]*$>nul || (
  REG QUERY "HKLM\Software\Microsoft\Internet Explorer" /v svcVersion | FINDSTR /I /R ^11[.][0-9]*[.][0-9]*[.][0-9]*$>nul || (
   REG QUERY "HKLM\Software\Microsoft\Internet Explorer" /v svcVersion | FINDSTR /I /R ^10[.][0-9]*[.][0-9]*[.][0-9]*$>nul || (
    CALL:ERROR "RESOURCE ERROR: Unable to determine IE version"
    GOTO:EOM
    )
   CALL:UNINSTALL_IE "10.0"
   GOTO:EOM
   )
  CALL:UNINSTALL_IE "11.0"
  GOTO:EOM
  )
 ECHO. IE9 Deteced, No action taken
 :EOM
 CALL :CLR_VAR "PAUSE_ON_ERROR"
 GOTO:END

:: End of File
:END
 ECHO.
 ECHO. [Process complete]
 IF "%PAUSE_ON_EXIT%" EQU "true" PAUSE>nul
 SET PAUSE_ON_EXIT=<nul

Yorumlar

Bu blogdaki popüler yayınlar

Uzak Masaüstü Bağlantı Geçmişini Silmek

TERMINAL SERVICES UNLIMITED

Gpupdate Komutu