If you're developing a custom action (or many), you might save yourself a lot 
of time in the future by investing a bit upfront into unit testing your CA. 
This would allow you to invoke it from CPPUNIT, assert conditions, and obvious 
debug it without message boxes.

There's a post about the approach here -  
http://code.dblock.org/ShowPost.aspx?id=7 - and it's fully implemented in 
AppSecInc. community MSI extensions - http://msiext.codeplex.com. 

I haven't had to stick a message box in a CA for a while to debug it "live" :)

dB. @ dblock.org 
Moscow|Geneva|Seattle|New York


-----Original Message-----
From: little.forest [mailto:little.for...@ymail.com] 
Sent: Tuesday, August 24, 2010 5:12 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] How to debug CustomAction DLL

Dear Wix Experts:

We have a CustomAction DLL written in C. How to debug it?

There are a few posts about it:
Post1: 
http://www.davidmoore.info/2010/06/28/how-to-debug-a-windows-installer-custom-action/
 
Post2: http://blogs.msdn.com/b/astebner/archive/2005/06/17/430320.aspx 
Post3: http://msdn.microsoft.com/en-us/library/aa368264(VS.85).aspx 

I tried it in Windows 7. I did set MsiBreak, but that famous "message box" 
never 
showed up. So I tried it in XP, the "message box" showed up. It says "To debug 
your custom action, attach your debugger to process 5632(0x1600) and press OK". 
I opened Windbg.

Post1 says "attach the process", Post2 says "Open Executable...". I tried both, 
neither works for me. In both cases, I got "*** ERROR: Symbol file could not be 
found.  Defaulted to export symbols for C:\WINDOWS\system32\ntdll.dll - 
ntdll!DbgBreakPoint: 7c90120e cc              int     3" in Windbg.

Questions:
1. What's the problem here?
2. Should I attach process? Or should I "Open Executable..."?
3. If I should attach process, why it doesn't work?
4. If I should "Open Executable...", what the "File name" and "Arguments" 
fields 
should be? For example, the "File name" should be "C:\Temp\MyApp.msi" or 
"C:\Windows\system32\msiexec.exe"? How about arguments? Should it be "/i 
C:\Temp\MyApp.msi"?
5. Why it doesn't work in Windows 7?

If you even debug DLL CustomAction, pls let me know.

Thanks!

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to