How can I speed up MSI package install and uninstall?

9,200

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:

Share:
9,200

Related videos on Youtube

Stein Åsmul
Author by

Stein Åsmul

Deployment specialist, release manager, corporate packaging and some development experience.

Updated on September 18, 2022

Comments

  • Stein Åsmul
    Stein Åsmul over 1 year

    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?

    • Stein Åsmul
      Stein Åsmul almost 10 years
      What do you know, I am instantly down-voted for trying to provide some practical and technical advise from the world of deployment to the world of system administration. The advice in this thread is both logically and technically sound as of the time of writing. Constructive criticism welcome.
    • mfinni
      mfinni almost 10 years
      You've essentially written an article on some facets of MSI technology. That's cool, I guess. I've never, as a sysadmin, really needed to solve the problem of "My software installs are so slow."
    • Stein Åsmul
      Stein Åsmul almost 10 years
      This is an updated answer to a question I have seen several times on this site and other stack-exchange sites.
    • MrGigu
      MrGigu almost 10 years
      @mfinni - doesn't mean it's not on-topic though. There are plenty of problems that I see on this site that I don't experience.
    • mfinni
      mfinni almost 10 years
      He was asking why he was down-voted without comment. I didn't vote, but gave an answer that I saw as a possible reason why.
    • Snowlockk
      Snowlockk almost 10 years
      @Glytzhkof Good question IMHO, but one minor thing. We have questions not threads.
  • n611x007
    n611x007 over 8 years
    isn't that MSIFASTINSTALL? without ER on the tail.
  • Kathir Subramaniam
    Kathir Subramaniam over 5 years
    I have added the property MSIFASTINSTALL=3 in my Wix project. Still, there is no difference in install time. <Property Id="MSIFASTINSTALL" Value="3"/> Whether i did anything wrong?
  • Stein Åsmul
    Stein Åsmul over 5 years
    It mainly improves "get off the ground" time for an MSI - the creation of a system restore point can be slow. It also helps the calculation of space requirements, but the actual installation itself isn't much faster. Hold on while I locate another answer I might send you to.
  • Stein Åsmul
    Stein Åsmul over 5 years
  • Stein Åsmul
    Stein Åsmul over 5 years
    As you will see: no silver bullet, but some tweaks you can make. How large is your setup?
  • Kathir Subramaniam
    Kathir Subramaniam over 5 years
    My setups are around 200 MB to 600 MB.
  • Stein Åsmul
    Stein Åsmul over 5 years
    A lot of very small files?