I've found the MsiBreak environment variable is a very useful tool for debugging custom actions. See http://msdn.microsoft.com/en-us/library/aa368264.aspx for the details, but in a nutshell:
1) Start a command prompt (if you are on Vista make sure it is elevated. XP make sure you are an admin) 2) Set the MsiBreak environment variable to the name of your custom action 3) Run the MSI from within the command prompt window MSI will throw a dialog up before it runs your custom action with the process number you should attach to. Then attach to that process, click on on the MSI dialog, and it'll automatically break at the start of your custom action. You can then debug from there. Neil ________________________________________ From: [EMAIL PROTECTED] [EMAIL PROTECTED] On Behalf Of Tony Juricic [EMAIL PROTECTED] Sent: Thursday, September 11, 2008 4:47 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Debugging C++ Custom Actions I often encounter problems debugging deferred C++ DLL CAs. Most of the time DebugBreak() works. Now and then it won't and then I use __asm { int 3 } which, for some reason, tends to work more often than DebugBreak. Then I encounter situations when even int 3 won't work in the sense that Vista (and 4.0 Installer) does not offer me a chance to break into the debugger but, instead, shows a dialog box saying "Windows installer stopped working and was closed". In this dialog I can only press Close button and my installation appears successful. I just appears so because the bunch of CA code that was supposed to execute after int 3 didn't execute and that is fatal for my apps. If I remove int 3 (or DebugBreak()) then I don't see the dialog box mentioned above and but that doesn't help my debugging. Do you encounter similar problems and can anybody suggest reliable method to break into deferred action DLL code? Thanks! ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users