In this topic, we’re going to cover some basic concepts that we use when troubleshooting the Windows Installer engine as well as some useful tools.
There are two phases to every Windows Installer installation, Acquisition and Execution. If an installation is unsuccessful, then a rollback may occur. At the beginning of the acquisition phase a user instructs the installer to install a feature or component. The installer gets all of this information from the installation database (.msi). This is performed under the users context, referred to as client side. This information is used to generate a script that provides the installer with step-by-step instructions for performing the installation. We then enter the execution phase, the installer passes this information off to a process with elevated privileges and we run the script - referred to as the server side.
An equally important feature of the Windows Installer is the rollback. As I mentioned above if the installation is unsuccessful a rollback may occur. During the installation the installer keeps track of all the registry changes and files that are updated and it compiles those into a rollback script, so if the installation does fail we can put the machine back to its pre-existing configuration prior to executing this particular package. The benefit of this is that it allowed software vendors to reduce the ever growing "DLL Hell" that was a common problem with some older installation technologies.
So, let's dive right into troubleshooting a Windows Installer issue. This issue concerns a SQL 2005 SP2 installation on a Windows Server 2003 (64-bit). On this server, we'd noticed some random issues with this server in respect to the Windows Installer. When launching some applications the Installer would run and some applications wouldn’t uninstall but with this being a SQL server it didn’t become a real problem until it was time to apply the latest SQL service pack. The error that we got during the SQL Server service pack installation was pretty nondescript so we started by checking the basic functionality of the installer by attempting to uninstall an application from this server. When we tried to do this we were presented with the error message as shown.
The first thing that we want to do is check for any Windows Installer Event Logging. To learn more about Windows Installer Event Logging, check out this MSDN Article on Event Logging. In this scenario, by checking the Application Event Log we see that we are getting an Event 1015 and the error code is 0x80040154 as shown below. Here’s where knowing what tool to use to extract the right data from the event will get us pointed in the right direction.