Why do MSI installers take so long?

So you download a program and run the installer. It copies some files, writes some registry entries, maybe uninstall an old version if necessary.

With third-party installers like Nullsoft and old InstallShields, this takes all of a few seconds on a modern PC.

Try this with any program using the MSI install system and suddenly the process takes 10x longer, even for non-upgrade installs that have no dependency or versioning issues. What gives?

Are you sure it’s not just that the MSI packages tend to install more stuff?

The windows installer (msi) does everything through the registry, and registry accesses aren’t known for their blinding speed. It’s not just reading and writing registry data that the program you are installing uses, but a lot of additional information that the windows installer uses also ends up in the registry.

The windows installer also has a lot of features which you can use to make a more robust install, like making an automatic system restore point which would obviously take quite a bit more time than just running an install script that copies files. The more of these features the developers use, the slower the install. Most developers like being able to rollback the installation if something fouls up, so most msi installs by default do a system restore plus back up any files that are modified. You had to do all of that stuff manually with installshield.

MSI files are also often compiled to make them smaller. This requires the files to be extracted before anything can be done with them, which also slows things down.

I doubt it, since more often than not the entire archive is only a few MB. It’s unlikely that Microsoft uses some sort of uber compression scheme.

What do you mean “does everything through the registry”? NSIS and InstallShield have no problem reading/writing application settings to the registry in a matter of milliseconds; a few keys here and there shouldn’t take that long, should it? What’s MSI/Windows Installer doing differently?

Yeesh, that would explain a lot of it. Do you know if I can turn off this behavior somehow? I’ve never needed to roll back an installation and I can manually create restore points if I know I’m doing something risky.

Seems like most programs are modular enough that they could be independently updated/deleted/reinstalled without affecting anything else, making a slow system restore prior to every install seem unnecessary.

Most modern installers can package their payload into a compressed, integrated bundle, no?