When a software installation which uses Windows Installer Package fails, you enable Windows Installer Logging and re-run setup to capture the output to a log file for troubleshooting. This can be done using three ways: using the Registry Editor, using the Group Policy Editor or by running the msiexec.exe command with required parameters.

The first two methods are documented in article How to Enable Windows Installer Logging. The third method uses the msiexec.exe command-line parameter. Here is an example:

msiexec /l*v d:\mylog.txt /i "C:\Users\Ramesh\Desktop\7z465-x64.msi"

This starts the 7-Zip .msi installation (7z465-x64.msi) and records all the results, including verbose output to a log file named mylog.txt located at D:\

Do you find it difficult to type the entire command-line everytime when you need to log application setups? No problem! You can implement this in the context menu for .msi files so that you can launch the installation with logging in a couple of mouse clicks.

Add "Install (with Logging)" to the Right-Click Menu for .MSI files

1. Click Start, type Regedit.exe and press ENTER:

2. Navigate to the following branch:

HKEY_CLASSES_ROOT\Msi.Package\shell\

3. Create a subkey named Open2

4. Select Open2, and set the (default) value to Install (with Logging)

5. Under Open2, create a subkey named command

6. Select command, and set the (default) value as follows:

msiexec.exe /l*v d:\mylog.txt /i "%1" %*

Note: I’ve set the output file path as "D:\mylog.txt". You may change the output file name and path accordingly. Note that existing log file with the same name will be replaced. If you need to append data to the existing log file, you need to include additional command-line switch.

7. Exit the Registry Editor.

8. This adds the Install (with Logging) option to the right-click menu for .msi files.

9. Now right-click on the software package that you want to install with logging, and click Install (with Logging).

10. This starts the installation with logging. Just to confirm, you can check the msiexec.exe process and its command-line in Task Manager. (Ref: Configure Task Manager to display full path of running processes)

11. After setup completes, open the log file (D:\mylog.txt) if you want to analyze what went wrong during the setup.

Analyzing and interpreting a Windows Installer log is another helluva task. For more information on working with Windows Installer logs, check out the following articles:

Richard’s Weblog : How to Interpret Windows Installer Logs

Windows Installer: Troubleshooting Setup Problems

Related Posts


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

3 Comments

  1. John Dangerbrooks
    said this on Thursday, May 6th 2010 5:45 pm

    I must agree with anon: Windows Installer logs are complex and are only understandable for application developers.

    Perhaps one of the cruelest ways of torturing a user who is badly in need of a software is to write that software’s setup program in manner that upon the slightest failure, show the following error message:
    “Installation failed: An error occurred. Check the log for the error message. Good luck, poor unfortunate average user.”

  2. said this on Wednesday, May 5th 2010 10:42 am

    @anon: Tried the “/le” switch which logs only error messages.

  3. anon
    said this on Wednesday, May 5th 2010 2:34 am

    A good MSI log reader that filters out the “succeeded junk” and shows only the error lines is also sorely needed. It’s so hard to understand an MSI log.

Leave a Reply