This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- how to make string properties to both immediate and deferred CAs?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 20, 2008
06:47 PM
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
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
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
May 20, 2008
09:06 PM
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.
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.
![](/skins/images/3B39CE851FDD5528C393F146EB70A2D0/responsive_peak/images/icon_anonymous_message.png)