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
- :
- passing CustomActionData to deferred managed code CA
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
‎May 10, 2011
05:53 AM
passing CustomActionData to deferred managed code CA
Hi,
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:
_WW_InstallShares="[PACKAGE_FOLDER]"
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:
[PACKAGE_FOLDER]
[_WW_InstallShares]
[CustomActionData]
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:
http://kb.flexerasoftware.com/doc/Helpnet/installshield15helplib/ManagedCA-Arguments.htm
Please help.
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:
_WW_InstallShares="[PACKAGE_FOLDER]"
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:
[PACKAGE_FOLDER]
[_WW_InstallShares]
[CustomActionData]
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:
http://kb.flexerasoftware.com/doc/Helpnet/installshield15helplib/ManagedCA-Arguments.htm
Please help.
(3) Replies
‎May 10, 2011
09:21 AM
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.
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.
‎May 11, 2011
10:50 AM
Thank you for your reply. I already read all the information you posted. Did you read this:
http://community.installshield.com/attachment.php?attachmentid=7220&d=1217951981
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.
http://community.installshield.com/attachment.php?attachmentid=7220&d=1217951981
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.
‎May 12, 2011
02:20 PM
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.
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.