Windows – Why Do .msi Files Take Longer to Uninstall

installeruninstallwindowswindows-installer

Since the Windows XP days, Windows Installers (.msi files), including InstallShield installers (which is just a bootstrap for MSI) has taken around five times longer to uninstall an application than other installers. The same is also usually true about installing.

Why do they still take this long, and why do people still use MSI for installing? For example:

Uninstall VLC – takes around 5 seconds.
Uninstall XYZ – launches "Preparing to remove…" followed by a 15 second delay.

All it's doing is removing files and cleaning the registry (which may include COM registrations), so why does it take so long?

Best Answer

Windows installer first systematically creates a system restore point, which is a quite slow operation.

Also from the article entitled, appropriately, "Windows Installer sucks", an excerpt:

It used to be that installation would consist of a program executing and taking a few simple steps to install your software, then do the reverse on uninstallation.

That's not how Windows Installer works. Instead of running a program to simply install and let it be done with, it examines the state of your system, then examines the state of the database that is the program's installer, then does a series of overcomplicated calculations about how to reconcile the two.

It seems that, instead of running an installation script, it goes about solving a traveling salesman problem. Which is why it runs so slow. Or at least, that's my impression.

I also add that Windows installer keeps all information in the registry, which is not the world's fastest database.

Related Question