PDA

View Full Version : Suite/Advanced UI: set Feature.actionState via custom action



jarcinfo
08-18-2015, 06:29 AM
Hello,

Does somebody know if there is a way to set FEATURE[feature-name].action using a custom action (DLL, InstallScript, or Managed code) ?
If yes, could you please give me the syntax ?
Please note that I am using InstallShield 2015.

Thank you

MichaelU
08-18-2015, 09:43 AM
Note that the (for lack of a better term) pseudo-property must include the final term as actionState not just action: FEATURE[feature-name].actionState.

The notation FEATURE[feature-name].actionState is only available to actions run by the UI, so of the kinds you mention, you will need a C++ DLL that uses the ISuiteUIExtension interface to read and set properties. As our managed code and InstallScript actions are run by the engine instead of the UI, they will not have access to this pseudo-property. In C++ the syntax will look something like the following, depending on the name for your variables, and what (if any) helper classes you use:

spSuiteExtension->put_Property(CComBSTR(L"FEATURE[feature-name].actionState"), CComBSTR(L"install"));
See Referring to Feature States and Other Feature Data in the UI of an Advanced UI or Suite/Advanced UI Project (http://helpnet.flexerasoftware.com/installshield22helplib/helplibrary/SteFeatureStateOvrvw.htm) in the help, as well as the help topics near it, for related information.

jarcinfo
08-19-2015, 02:27 AM
Hello,

Not easy to create the C++ extension DLL (for a C++ beginner as me) but after many trials, it works.
Thanks again