Internet Explorer Silent Installation and Uninstall

This article applies to Internet Explorer 9, Internet Explorer 10 and Internet Explorer 11.

Internet Explorer Silent Installation


IE 9 can be downloaded here. SourceFile = IE9-Windows7-x64-enu.exe
I’ve downloaded the English 64bit version, for Windows 7. It’s not really relevant, the command line will be the same.

IE 10 can be downloaded here. SourceFile = IE10-Windows6.1-x64-en-us.exe
IE 11 can be downloaded here. SourceFile = IE11-Windows6.1-x64-en-us.exe

Silent Install

PathtoSourceFile\SourceFile /quiet /update-no /norestart /log:LogFolder

Attention: the log parameter refers to the folder in which a log file will be created.

With this command line, you can safely upgrade an existing installation; no extra actions are required.

Internet Explorer Silent Uninstall (Rollback)

Uninstalling is the trickier part.

Create a batch file with the following content:

FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-*~XXX.?.????.?????.mum /c “cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart /quiet”

where XXX is “9”, “10” or “11”, depending on which version you need to remove.
This command line will remove the mum files belonging to the corresponding version of IE, from Windows\servicing\Packages.

The end result will be a rollback to the previous version of IE. If you’re uninstalling “11” and you had 9, then that’s what you’ll obtain. If you apply the same removal procedure for “9”, then you’ll rollback to 8 or whatever was present on the machine initially.

A reboot will be needed after each installation OR uninstall.

Error 40007

If, during the installation of IE, you get an error code of 40007, it means that some prerequisites (hotfixes) are missing. It can also be that they’ve just been installed, but the PC hasn’t rebooted. Reboot the machine and try the installation again.

Silent Installations using Inno Setup

Inno Setup is a free installer for Windows software. It is not as popular as Windows Installer (MSI), but still widely used.

Applications distributed using Inno Setup can usually be installed silently, unless there are custom actions that didn’t take into consideration the scenario of a silent install.

The most used parameters of an Inno Setup are:

/SILENT – Runs the setup silently. The wizard and the background window are not displayed. However, the installation progress will be shown. In case of a necessary reboot, if the /NOREBOOT parameter is NOT mentioned, there will be a prompt asking for reboot.
/VERYSILENT – Same as /SILENT, but it doesn’t show the progress. If the /NOREBOOT switch is not used and a reboot is needed, the setup will automatically restart the machine.
/LOG=”filename” – logs the installation to a file. Quotes are important.
/NORESTART – suppresses the reboot messages and instructs setup not to restart when the installation is done, even if it’s needed.
/SAVEINF=”filename” – saves the installation configuration to the specified file. Quotes are important.
/LOADINF=”filename” – loads a previously saved installation configuration.

Other switches:
/SUPPRESSMSGBOXES – only when combined with the /SILENT and /VERYSILENT switches, it suppresses most of the dialog boxes. When there’s a choice, it uses the default option (No for overwriting files, Abort when there’s an Abort/Retry option, Yes when asked about keeping a newer file, Yes for restart).
/SP- – disables the “This will install…” prompt at the beginning.
/CLOSEAPPLICATIONS – Closes applications that hold files needing to be updated.
/NOCLOSEAPPLICATIONS – Prevents the setup from closing applications that hold files needing to be updated.
/RESTARTAPPLICATIONS – Applications closed by the setup will restart.
/NORESTARTAPPLICATIONS – Closed applications will not restart.
/DIR=”path” – Sets the installation directory. It overrides whatever the user has mentioned in the Select Destination Path wizard page. Full path.
/GROUP=”folder name” – Provides the name of the shortcut folder.
/NOICONS – No shortcuts created.
/TYPE=typeName – Overrides the default setup type (Complete, Custom, Minimal)
/COMPONENTS=”component1,component2,etc” – selects a list of components to be installed
/TASKS=”task1,task2,etc” – selects a number of tasks (such as desktopicon, fileassoc)
/MERGETASKS=”task3,task4″ – adds additional tasks to the default ones.
Both task params can also negate (!) a task: !desktopicon
/PASSWORD=password – specifies a password to use

For Uninstall, the unins000.exe (or higher index) from the installation directory must be called, with one of the following parameters: