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:
- Enable MSI Debug logging via policy.
- Run DebugMon.exe while you make MSI API calls
- Collect the logs for the fast and slow response scenarios in separate Debug logs. Share the debug spew.
- Turn off MSI logging policy to ensure that system performance is not hindered due to logging.
How do I set MSI Debug Logging?
Add the following values under the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Installer "Debug"=dword:00000007 "Logging"="voicewarmupX"
net stop msiserver
Kill any remaining instances of msiexec.
net start msiserver
Restart the application which needs to be investigated.
Repro the Scenario and collect debugger logs from debugmon.exe.
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
- Hemchander Sannidhanam, MSI Team Dev. You can get other Hem insights about developing for Windows Installer from the Windows Installer Chat Archives
[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.
Comments
Anonymous
September 27, 2005
What is the "X" in the logging key above and in what version was it added?Anonymous
October 01, 2005
Reference to 'x' is http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/command_line_options.asp. Checking on when it appeared.
[Author: Robert Flaming (http://blogs.msdn.com/rflaming)]
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 http://www.microsoft.com/info/cpyright.htm.Anonymous
October 01, 2005
Reports are this was added for MSI 3.1 v1. Entering doc bug.
[Author: Robert Flaming (http://blogs.msdn.com/rflaming)]
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 http://www.microsoft.com/info/cpyright.htm.Anonymous
July 09, 2008
PingBack from http://www.vistax64.com/vista-games/28376-problems-installing-midway-games-area-51-a.html#post772179Anonymous
January 02, 2009
PingBack from http://blog.dragonsoft.us/2009/01/02/visual-studio-2008-and-iis-7/