The Windows Installer engine, msiexec.exe, is a bit of a black box. To see inside that box you can run your installers (msi’s) from the command line with verbose logging using:
msiexec /i MySetup.msi /lv* install.log
Opening up this text file and looking over it directly is not super helpful. Fortunately there is a tool for this but it is obscure and you need to know what it is called and where it is. It is the Windows Installer Verbose Log Analyzer (WiLogUtl.exe). How is that for a name! It comes with the Windows SDK and is found in C:\Program Files\Microsoft SDKs\Windows\v<x>.0\Bin, where <x> is you SDK version, e.g. 7. I’ve upload the WiLogUtl.exe, which is all you need, to OneDrive here for easier accessibility.
The tool is quite cumbersome, but does the job really well. You start by press the Browse button and select your log file. The Open button only opens the file in notepad, as below, which is a really pointless function. The magic is in the Analyze button.
This particular 514 KB 2233 line log file is of a failed install. Finding the error is tricky. After hitting Analyze the error is the first thing shown.
So I had an error in my Custom Action CA_IISGetSelectedWebSite. The States button shows the Feature and Component states through the install. So if you have an unselected feature, you will see it here.
The Properties is one of the most useful views. It details what the properties were defined at during difference stages on the install, note the Client, Server or Nested options at the bottom.
The next useful view is the HTML Log. This is just a color code view of the log file with helpful navigation buttons. It makes getting at the detail simple and understandable.
If you have to debug Windows Installers this will save you a bunch of time and headache.