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
- :
- Re: Question about CustomActionData properties?
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
‎Apr 21, 2008
09:59 AM
Question about CustomActionData properties?
I just want to be sure I understand correctly about calling functions that have to access property data during the Deferred Execute sequence.
Now we have to create/set a property that has the same name as the custom action that needs to be called during a Deferred Execute event.
In the custom action code we then use the following call to get the property value:
uiReturn = MsiGetProperty(hModule, TEXT("CustomActionData"), szCustomActionData, &dwCount);
This is fine and works good, but my main question is what happens if you have other properties you need to access at different times and through different custom action calls?
I know that you can set the CustomActionData property to contain many values with ";" between them, but then they would be used for a specific custom action function.
I just want to verify that if you set other properties to other custom action call names and access them through this process that it is a totally seperate from the other calls and the information retrieved would be the correct information and not the information that may have been set from any other Deferred custom action that also needs to use the CustomActionData property.
Thanks,
Now we have to create/set a property that has the same name as the custom action that needs to be called during a Deferred Execute event.
In the custom action code we then use the following call to get the property value:
uiReturn = MsiGetProperty(hModule, TEXT("CustomActionData"), szCustomActionData, &dwCount);
This is fine and works good, but my main question is what happens if you have other properties you need to access at different times and through different custom action calls?
I know that you can set the CustomActionData property to contain many values with ";" between them, but then they would be used for a specific custom action function.
I just want to verify that if you set other properties to other custom action call names and access them through this process that it is a totally seperate from the other calls and the information retrieved would be the correct information and not the information that may have been set from any other Deferred custom action that also needs to use the CustomActionData property.
Thanks,
(3) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2008
10:28 AM
Each deferred action can read a property called CustomActionData which has been populated when the deferred action was encountered in the immediate traversal of the execute sequence. This property is populated with the value of the property named the same as the action being deferred. So yes, each deferred action gets its own CustomActionData property value.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2008
11:02 AM
Thanks Michael,
I figured that that was how it worked, but I just had to confirm so that I did not get into any issues later on when I get more and more custom actions that need to be triggered in Deferred mode.
Thanks again.
I figured that that was how it worked, but I just had to confirm so that I did not get into any issues later on when I get more and more custom actions that need to be triggered in Deferred mode.
Thanks again.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 21, 2008
12:42 PM
You can also have 1 immediate CA setup the CustomActionData property for multiple deferred CA's as long as it's scheduled before all of the various deferred execution CA's.
For example you might have the CA's:
CustomDoSomething_CAD
: Query CustomSomething table
: Evaluate Component Conditions
: Generate CustomDoSomething_Uninstall CAD property
: Generate CustomDoSomething_Rollback CAD property
: CustomDoSomething_Install CAD property
: CustomDoSomething_Commit CAD property
CustomDoSomething_Uninstall
: Read CAD property and uninstall something
CustomDoSomething_Rollback
: Read CAD property and rollback something
CustomDoSomething_Install
: Read CAD property and install something
CustomDoSomething_Commit
: Read CAD property and commit something
For example you might have the CA's:
CustomDoSomething_CAD
: Query CustomSomething table
: Evaluate Component Conditions
: Generate CustomDoSomething_Uninstall CAD property
: Generate CustomDoSomething_Rollback CAD property
: CustomDoSomething_Install CAD property
: CustomDoSomething_Commit CAD property
CustomDoSomething_Uninstall
: Read CAD property and uninstall something
CustomDoSomething_Rollback
: Read CAD property and rollback something
CustomDoSomething_Install
: Read CAD property and install something
CustomDoSomething_Commit
: Read CAD property and commit something