The Windows Installer Service

Heath Stewart

Some have noticed that the msiexec.exe process seems to run for quite some time after a known installation completing, or that the Windows Installer service starts and stops even though it is set to manual startup mode. These are often the same process, and when you see msiexec.exe running as SYSTEM that is the Windows Installer service running, or a custom action remoting service.

When you use Windows Installer APIs like MsiInstallProduct or invoke msiexec.exe that will use these APIs itself, the Windows Installer service is started to handle the actual installation. This service will stop itself after 10 minutes of inactivity to optimize for multiple products or patches being installed in a chain, related or not. You should never kill this process, however, as you can leave your machine in a corrupt state. Windows Installer is a transactional installer (custom actions may violate this premise, but it is recommended they follow guidelines to prevent doing so) and will clean-up what it has done should any errors occur – as long as it’s running.

Because msiexec.exe is invoked by the client and handles client processing of the installer package – initial launch conditions and the UI – you will see an msiexec.exe running as a user sometimes as well. If an external UI handler or bootstrap application uses the APIs, you may not see a client msiexec.exe. A separate instances of msiexec.exe may also be launched to invoke a custom action. None of these processes should be killed.

If msiexec.exe is running and you want to know if an installation is actually in progress, you can check the installer mutex or check if the service will accept a stop request. If you were to type “net stop msiserver” on the command line, you would see the error “The requested pause or stop is not valid for this service.”, and to lookup error information for error 2191.

0 comments

Discussion is closed.

Feedback usabilla icon