Installing Internet Explorer 11 and prerequisites via SCCM deployable script with only one reboot.
My customer needed some help deploying IE 11 out to a bunch of Windows 7 32-bit machines, but they only have one maintenance window for rebooting per month. They didn't want the machines going out to the internet to get the prerequisites, so they were stuck at a bit of a quandry.
I found several references on how to do this; some were .vbs scripts, some powershell, some as batch files, but all seemed to be missing one or more pieces of useful data. Most of those used the IEAK, and I had no luck at all making a silent internet-less installer with it.
Here is my solution. It deploys all of the IE 11 Prerequisites, IE 11, and the December 2014 Cumulative update with just one reboot at the end.
I've included links in the script so you can download the patches, and an explanation of how to get the .CAB files out of the .msu and out of the IE installer executable.
Install-IE11.Bat
@echo off
REM Each of the KB download links is a .MSU file. To use this script, you must extract the .cab file from the MSU.
REM This can be extracted with 7-zip or the built-in Windows' Expand command.
REM Example: expand Windows6.1-KB2888049-x86.msu /f:*.cab c:\pathtoexpandto
REM This script expects all of the .cab files to be in the same folder with the batch file.
set InstallerPath=%~dp0
set Logfile=c:\windows\temp\IE11-Dism.log
REM https://support.microsoft.com/en-us/kb/2834140
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2834140-v2-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2670838
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2670838-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2639308
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2639308-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2533623
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2533623-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2731771
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2731771-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2729094
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2729094-v2-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2786081
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2786081-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2888049
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2888049-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2882822
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2882822-x86.cab /quiet /norestart
REM The IE-Win7.cab file was extracted from your IE11-Windows6.1-x86-en-us.exe with the command
REM IE11-Windows6.1-x86-en-us.exe /x:C:\pathtoexpandto
REM This can be downloaded from http://www.microsoft.com/en-us/download/internet-explorer-11-for-windows-7-details.aspx
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\IE-Win7.cab /quiet /norestart
REM This is the December 2014 IE CUMULATIVE UPDATE
REM It should be replaced by the most recent approved CU at time of packaging.
REM Downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=45134
REM Extracted with expand IE11-Windows6.1-KB3008923-x86.msu -f:*.cab c:\pathtoexpandto
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\IE11-Windows6.1-KB3008923-x86.cab /quiet /norestart
REM The customer wanted SCCM to handle the post-installation reboot. If you want this script to reboot the machine, uncomment the next line.
REM C:\Windows\System32\shutdown.exe /r /t 300 /d p:4:2 /c "Your system will restart automatically in 5 minutes to complete a software installation."
HTH
The batch file can be downloaded from here: Install-Ie11.bat
I found several references on how to do this; some were .vbs scripts, some powershell, some as batch files, but all seemed to be missing one or more pieces of useful data. Most of those used the IEAK, and I had no luck at all making a silent internet-less installer with it.
Here is my solution. It deploys all of the IE 11 Prerequisites, IE 11, and the December 2014 Cumulative update with just one reboot at the end.
I've included links in the script so you can download the patches, and an explanation of how to get the .CAB files out of the .msu and out of the IE installer executable.
Install-IE11.Bat
@echo off
REM Each of the KB download links is a .MSU file. To use this script, you must extract the .cab file from the MSU.
REM This can be extracted with 7-zip or the built-in Windows' Expand command.
REM Example: expand Windows6.1-KB2888049-x86.msu /f:*.cab c:\pathtoexpandto
REM This script expects all of the .cab files to be in the same folder with the batch file.
set InstallerPath=%~dp0
set Logfile=c:\windows\temp\IE11-Dism.log
REM https://support.microsoft.com/en-us/kb/2834140
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2834140-v2-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2670838
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2670838-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2639308
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2639308-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2533623
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2533623-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2731771
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2731771-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2729094
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2729094-v2-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2786081
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2786081-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2888049
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2888049-x86.cab /quiet /norestart
REM https://support.microsoft.com/en-us/kb/2882822
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\Windows6.1-KB2882822-x86.cab /quiet /norestart
REM The IE-Win7.cab file was extracted from your IE11-Windows6.1-x86-en-us.exe with the command
REM IE11-Windows6.1-x86-en-us.exe /x:C:\pathtoexpandto
REM This can be downloaded from http://www.microsoft.com/en-us/download/internet-explorer-11-for-windows-7-details.aspx
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\IE-Win7.cab /quiet /norestart
REM This is the December 2014 IE CUMULATIVE UPDATE
REM It should be replaced by the most recent approved CU at time of packaging.
REM Downloaded from https://www.microsoft.com/en-us/download/details.aspx?id=45134
REM Extracted with expand IE11-Windows6.1-KB3008923-x86.msu -f:*.cab c:\pathtoexpandto
C:\Windows\system32\dism /online /add-package /packagepath:%InstallerPath%\IE11-Windows6.1-KB3008923-x86.cab /quiet /norestart
REM The customer wanted SCCM to handle the post-installation reboot. If you want this script to reboot the machine, uncomment the next line.
REM C:\Windows\System32\shutdown.exe /r /t 300 /d p:4:2 /c "Your system will restart automatically in 5 minutes to complete a software installation."
HTH
The batch file can be downloaded from here: Install-Ie11.bat
Comments
I found two ways.
Dism /online /get-package | findstr /I InternetExplorer
Dism /online /remove-package /packageName:Microsoft-Windows-InternetExplorer-Package-TopLevel (you'll have to put the specifics of your package here.)
-or-
You can uninstall it by specifying the originating cab.
Dism /online /remove-package /packagePath:c:\some\long\pathIE-Win7.cab
Is there a way to have a log file added as well for success or failure
thanks
sundeep
Is there a way to have a log file added as well ..
thanks
sundeep
Yes, you can add a logfile by adding
/LogPath %logfile% /LogLevel 4
to each of the DISM commands. I had this in there before; I must have removed it when I was anonymizing.
If you have any more questions, please feel free to email me directly
Elizabeth.a.Greene@gmail.com
Thanks!