Join us for SoftSummit 2023. The 20th anniversary of the industry leading software monetization conference. April 18 and 20. Register Now

Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 3

passing CustomActionData to deferred managed code CA


Can anyone give me a glue? I want to pass property to deferred CA, implemented as .NET DLL. Name of CA is "_WW_InstallShares".

1. I have action in UI sequence which set property:

where PACKAGE_FOLDER is property I ask from user. I see in the log that property is set.

2. Now I run CA. Method signature is Actions.InstallShares(String folder). How do I pass CustomActionData as method parameter?? None of below works:


I always see in log:
InstallShield: Deferred action requested property MsiHiddenProperties not provided by CustomActionData
InstallShield: Loading assembly CustomActions from resource 4097
InstallShield: Deferred action requested property PACKAGE_FOLDER not provided by CustomActionData
InstallShield: Calling method with parameters [(System.String)]

What does it mean "MsiHiddenProperties"? I don't ask for it. I do everything as described in knowledge base article:

Please help.
Labels (1)
0 Kudos
3 Replies
Level 3

If you have managed custom action "MyAction" with the standard signature, to pass the data into the custom action you have to define another "set property" custom action and have it executed some time before you managed custom action. The property should be named exactly after your custom action: "MyAction".
The propery value is the string with all the data you need - you'll have to parse it inside the custom action.
When custom action is executed, "MyAction" property will be mapped to "CustomActionData" property - get it and you'll get your string.
Make sure you "property set" action is executed before you custom action - take care of the conditions. A bit twisted, isn't it?:)

"Standard signature" managed custom action is the method with the only input parameter Int32 (which is an MSI custom action handle) and the return value is Int32 (which is the return code).
If you use standard signature managed methods, you'll have to dial with InstallShield MSI interop assembly - which is not as awful as it may sound.;)

If you use custom signature method (the one in your example), you have to specify the input parameter values in the custom action designer - in the dialog where you choose the custom action method from the assembly you've chosen before.
You can specify either the static string or use [MyProperty] syntax to use the value of "MyProperty" property.
In the same dialog you can specify the property you would like to be set from the method return value.
0 Kudos
Level 3

Thank you for your reply. I already read all the information you posted. Did you read this:

There is even no need of parsing.

For those who are having similar problem:

Auxiliary custom action that sets "MyAction" property (_WW_InstallShares in my case) must be not in UI, but in Execute sequence. Otherwise, deferred CA does not see new property value.
0 Kudos
Level 3

Yes, thank you, I did read this.
However, in some custom actions I need to use installer API so I have to use standard signature custom action methods to get hold of MSI handle.
Thus the need to get and parse "CustomActionData" property to get both the action info and be able to do additional actions using MSI handle.

I could not find the way to have both for custom method signature.
0 Kudos