cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
peterbi
Level 7

how to make string properties to both immediate and deferred CAs?

Hi,

We all know that deferred CAs can't use MsiGetProperty() to access property values, it has to go through "CustomActionData". All our CAs are MSI DLL (C++) stored in binary table, and we have to pass the string values to classes that are used by messaging functions.

Is there a way to ease the work? In other words, is there a way that those string properties can be accessed by both immediate and deferred (not via CustomActionData) CAs? Simply and quickly? We are thinking of a RC file in our C++ project, is there a better way? Please share your experience with us.

We are using IS2008 Basic MSI.


Thanks,
Peter
Labels (1)
0 Kudos
(1) Reply
Christopher_Pai
Level 16

An exported function is just that, an exported function. You can actually wire the same function up to multiple custom actions and then schedule them for different context.

Inside your C++ code you can use the MsiGetMode function to find out how you are running and what the correct MsiGetProperty() calls are to get the data you need.

http://msdn.microsoft.com/en-us/library/aa370125(VS.85).aspx

If you look at the WiX CA's you'll see that they actually use 1 single function to serve uninstall, install, rollback and commit. They just figure out how they are running and then branch to different behavior.
0 Kudos