I still don't know how to launch deferred CAs (Anyone? Please?), but more than one person e-mailed me directly to ask more details about what we're doing. I wrote a post about unit-testing custom actions here: http://code.dblock.org/ShowPost.aspx?id=7. Hope this helps.
Cheers dB. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dB. Sent: Sunday, August 10, 2008 12:37 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] How do I execute deferred CAs (for unit testing customactions)? This might not be quite directly related to wix, apologies if this is not the right list. There's the largest number of windows installer experts here and this might be useful to all custom action authors :) I've been working on unit-testing our C++ custom actions. In the beginning I had a shim that simulated MSI functions, but once we got to the complex ones (MsiExecuteQuery), it became clear that that's not the way to go. Today I create a database on the fly and can call any MSI function. Wrapped into CPPUNIT this makes a complete MSI testing framework. It looks roughly like this: MsiOpenDatabase(temporary file, MSIDBOPEN_CREATEDIRECT); // create a new blank database MsiGetSummaryInformation(...) // get existing summary information MsiSummaryInfoSetProperty(...) // set new minimal summary information for msi to be happy (PID_REVNUMBER, PID_PAGECOUNT and PID_WORDCOUNT), repeat for each property MsiSummaryInfoPersist // persist the property information in the msi MsiDatabaseCommit // commit the changes to disk MsiOpenPackage(temporaryfilename, & handle) // reopen the database as a runtime package Now I have an MSIHANDLE that can be passed into MSI functions. To call MsiDoAction, I also import the CustomAction and Binary tables that have the declaration of my custom action and the custom action binary respectively. Works well for immediate CAs. The one thing I can't figure out is how to execute deferred CAs? I tried running the whole sequence via MsiDoAction, but it always fails in InstallInitialize with 0x80070643: Fatal error during installation. Any ideas? Thx dB. -dB. dblock.org <http://www.dblock.org/> / foodcandy.com <http://www.foodcandy.com/> ------------------------------------------------------------------------ - 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