How do I get a deep view of what Windows Installer is doing?

Question

How do I get a deep view of what Windows Installer is doing?

Answer

One of the comments I got from the PDC was that the SDK documentation and commercial tools lacked sufficient depth if one really wanted to figure out what was going on. Verbose logging helps but what's happening in between log lines. In the course of day to day operations, hem offered the following

let us see if the following steps help in narrowing down the API calls and the time spent in each of those API:

  1. Enable MSI Debug logging via policy.
  2. Run DebugMon.exe while you make MSI API calls
  3. Collect the logs for the fast and slow response scenarios in separate Debug logs. Share the debug spew.
  4. Turn off MSI logging policy to ensure that system performance is not hindered due to logging.

How do I set MSI Debug Logging?

  1. Add the following values under the key:

     
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer
    
    "Debug"=dword:00000007
    
    "Logging"="voicewarmupX"
    
    
  2. net stop msiserver

  3. Kill any remaining instances of msiexec.

  4. net start msiserver

  5. Restart the application which needs to be investigated.

  6. Repro the Scenario and collect debugger logs from debugmon.exe.

  7. After that, remove the registry entries added in step 1 and redo steps 2 and 3, otherwise Windows Installer will keep spewing out a lot of debug output which will make it really slow.

Most of our API, when this policy is set, spew to debugger the parameters and return values. However, there are some API that don’t log this info. In some instances, getting that partial info itself could be fairly useful.

Content credit also belongs to

[Author: Robert Flaming]

This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.