14

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
  • 2,566
  • 4
  • 25
  • 38
  • 1
    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. – Stein Åsmul May 13 '14 at 00:10
  • 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." – mfinni May 13 '14 at 00:49
  • This is an updated answer to a question I have seen several times on this site and other stack-exchange sites. – Stein Åsmul May 13 '14 at 01:06
  • 3
    @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. – Mark Henderson May 13 '14 at 02:43
  • 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. – mfinni May 13 '14 at 03:03
  • @Glytzhkof Good question IMHO, but one minor thing. We have questions not threads. – Jacob May 13 '14 at 03:25

1 Answers1

16

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:

Stein Åsmul
  • 2,566
  • 4
  • 25
  • 38
  • isn't that `MSIFASTINSTALL`? without `ER` on the tail. – n611x007 Aug 06 '15 at 15:30
  • I have added the property MSIFASTINSTALL=3 in my Wix project. Still, there is no difference in install time. Whether i did anything wrong? – Kathir Subramaniam Jan 23 '19 at 06:22
  • 1
    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 Jan 23 '19 at 09:34
  • 1
    [Speed up installation](https://stackoverflow.com/questions/52520739/wix-msi-with-large-number-of-files-takes-before-welcome-dialog-is-published). And the development end of it: [Speed up WiX build process](https://stackoverflow.com/questions/30032014/speed-up-build-process-of-wix-installer). [Administrative installations](https://stackoverflow.com/questions/5564619/what-is-the-purpose-of-administrative-installation-initiated-using-msiexec-a/5751980#5751980). – Stein Åsmul Jan 23 '19 at 10:11
  • As you will see: no silver bullet, but some tweaks you can make. How large is your setup? – Stein Åsmul Jan 23 '19 at 10:25
  • My setups are around 200 MB to 600 MB. – Kathir Subramaniam Jan 23 '19 at 11:20
  • A lot of very small files? – Stein Åsmul Jan 23 '19 at 11:32