msi – How to Speed Up MSI Package Install and Uninstall

installationmsiuninstallwindows-installer

When installing and uninstalling Windows Installer packages, or MSI files as they are called, the progress of the installation appears signifiantly slower than with other installation packages.

Why is this the case, and what can I do to speed things up?

Best Answer

Quick Summary

  • Need-for-speed properties to tweak:
    • MSIFASTINSTALL (try it, maybe 3 or 7)
    • FASTOEM (think twice, must read documentation)
    • DISABLEROLLBACK (understand what it means, can cause custom actions in MSI package to fail to run! It depends on the MSI design - look for commit- and rollback custom actions)
  • Security software can be suspended to speed up installations.
    • Try to disable whilst installing - scan your installer on virustotal.com.
  • Try running from an administrative image (alternative info) (no file extract needed).
    • Running from a local administrative image would be fastest.
    • High latency network could slow installation if you use a network administrative image?
      • Potentially high overhead per file (small files).
      • Downloading a single CAB could be faster (virus checking may take long here)?
  • System restore can be disabled globally on the machine (not just via MSIFASTINSTALL).

Background Information

Much of the slowness of a Windows Installer session is due to its rollback capabilities. Firstly it creates a restore point prior to install or uninstall (provided system restore hasn't been disabled). Then it will back up all affected files and registry keys during both uninstall and install to ensure that the system can be restored to its original state should an error occur. Later versions of Windows Installer feature ways to disable some of this complexity and speed things up. See technical information below.

Another speed factor is that all components and features in the MSI will be registered in the registry. This involves quite a bit of overhead, but is necessary to achieve important corporate deployment and system administration benefits. No other deployment technologies feature this level of control.

Large MSI files with embedded source files may need a lot of time to extract its installer files to the temp folder. This can sometimes be the biggest bottleneck of all. It is recommended to run an admin install to extract the source files from such a package so that they appear side-by-side with the MSI file itself, eliminating the need to extract files locally on each machine and hence saving deployment time. Here is another article describing file extraction from MSI packages in simple terms.


Technical Information


UPDATE (Feb.2018): You can set a property called FASTOEM under very special circumstances (see linked content) in order to speed up deployment. I have never tried this, but it is well-worth a read. I doubt you will succeed using it effectively, but it might be worth a try.


The most recent update to Windows Installer at the time of writing, Windows Installer 5 (available on Windows Server 2012, Windows 8, Windows Server 2008 R2 or Windows 7), features a new property MSIFASTINSTALL which can be used to speed up the installation of a large MSI package. See the link above for valid values. I would suggest 3 for no restore point, and only FileCosting (the process of determining disk space requirements). Or 7 to also reduce the frequency of progress messages.

Normal "costing" features a whole lot of feature, component, disk, and registry comparisons and calculations between what exists on the system and what is being installed. Most of this is rarely necessary in my opinion (disk space is generally plentiful on client PCs - and back in the reality of 2018 with smaller SD-disk the space issue might have resurfaced...), but it is obviously safer to let full costing run.

msiexec.exe /I "D:\winzip112.msi" /QN MSIFASTINSTALL=3

It is also possible to set the DISABLEROLLBACK property to disable rollback support in the MSI installer. I would strongly advise against using this unless you are staging a fresh PC. This is a special case when you can just start over if something fails. For a computer in real use I would not recommend enabling this property.

The irony is that disabling rollback will speed up things the most if you are running a huge update package that replaces lots of files, or any large uninstall (since an uninstall will move all removed files to a rollback area). It could be quite significant, but unsafe. You just set this property at the command line: msiexec.exe /I "D:\winzip112.msi" /QN MSIFASTINSTALL=3 DISABLEROLLBACK=1

Administrative Installation

And finally, as mentioned above in background information, run an administrative installation of the MSI file to extract files so that extraction doesn't happen locally on each machine. This assumes that you are on a rather fast network, and that file copy happens without too much delay. I suppose a high-latency wireless network could make things slower with small files extracted that have to be copied one by one. You run an admin install by simply passing a /a to the setup file:

setup.exe /a

or

msiexec /a "D:\winzip112.msi"

Then you need to follow the prompts and select an extraction location for the files. See superuser.com for a thread discussing this feature.


Some Links:

Speed: