Here's a creative approach: You could use an external UI handler to assist you in unit testing deferred custom actions. You can still create the MSI etc... like documented on code.dblock.org; but instead of actually invoking the custom actions yourself, fire off the install and process the messages. This gives you the ability to 'pause' the installation to perform unit testing functions at whatever point within the real MSI environment you so choose. If you don't want the installation "installed" force it to fail.
The approach has some advantages: 1) It's a real installation setting "no complicated mock objects, etc..." / simulated environments. It's the real deal. 2) Using this approach you could unit test your shipping installation's custom actions. 3) You can verify more things (like intercepting scheduling messages to ensure they are called when they should be, etc...), verify return codes, etc... 4) It's easier to unit test rollback and commit actions. Etc... I've been working on a C#, event-ing based UI handler that works for both, an embedded UI handler and an external UI handler; leveraging existing functionality within the DTF (delivered as part of WiX). The beauty is that all the information passed from windows installer is sliced and diced into EventArgs passed through the event you care to 'listen to'. The goal is to make it easy(ier) for folks to create UI handlers for windows installer; who knows, someday it might make it into the DTF... For a long while I too, was wondering how one might go about writing unit tests for deferred custom actions. Then, last night for whatever reason, I put 2 and 2 together... <Smile/> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dB. Sent: Tuesday, August 19, 2008 6:37 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] How do I execute deferred CAs (for unit testingcustom actions)? I just saw your reply. Thanks. Your approach is the shim one that we eventually abandoned because implementing the more complex MSI functions was a lot of work. Check out http://code.dblock.org/ShowPost.aspx?id=7, we use an actual MSI now. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Richard Sent: Tuesday, August 19, 2008 1:53 PM To: WiX Users Subject: Re: [WiX-users] How do I execute deferred CAs (for unit testingcustom actions)? In article <[EMAIL PROTECTED]>, "dB." <[EMAIL PROTECTED]> writes: > I still don't know how to launch deferred CAs (Anyone? Please?), > [...] Didn't I already answer you on the MSI newsgroup? -- "The Direct3D Graphics Pipeline" -- DirectX 9 draft available for download <http://www.xmission.com/~legalize/book/download/index.html> Legalize Adulthood! <http://blogs.xmission.com/legalize/> ------------------------------------------------------------------------ - 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 ------------------------------------------------------------------------- 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