View Full Version : Disable/hide feature at runtime

11-13-2003, 08:10 AM
Hello all,

i want to include a dialog in our standard project setup where the user can select the features which should be installed. But one of the features is only available to the customer if he has a special license. The information if the customer licensed this feature can be read out from a text file, located in the setup dir. Using this file i create a BOOLEAN variable in the installscript. Now my problem: if this variable is FALSE, either the special feature should be hidden or it should be disabled (displayed in grey with no chance to select).

I want to use the SdFeatureTree dialog because there you can display feature description. Is there a possibility to disable or hide features in this tree? Maybe the feature's display property will help, but i found no way to change this value at setup's runtime.

Any proposals will be welcome. If a newer InstallShield product is better to do this job, please recommend it. I will upgrade if it's necessary.

- standard project
- three features
- one of them depends on license
- value of licence read out from text file, is saved to a BOOLEAN
- using SdFeatureTree dialog or a comparable one were multiple selection is supported and the feature's description is displayed
- the feature depends on license should be hidden or disabled if BOOLEAN variable is FALSE

Any help is greatly appreciated.

Thanks in advance,

11-13-2003, 01:14 PM
It sounds like this is what you want:

if (!AllowFeature1) then
FeatureSelectItem(MEDIA, "Feature1", FALSE);
FeatureSetData(MEDIA, "Feature1", FEATURE_FIELD_VISIBLE, FALSE, "");

Hope this helps.

11-14-2003, 08:52 AM
Hello Philip,

thanks a lot. This works great.


01-05-2005, 11:18 AM
I am having a similar problem to the one stated above, but I do not want to make it invisible. I am having a hard time figuring out if it is possible to just have the feature grayed out, so that the user can see the feature but not select it.

Thanks for the help.

01-05-2005, 02:24 PM
I don't believe it's possible to make a feature visible but unselectable with built-in dialogs in Standard project or Basic MSI project. You will need to create a custom dialog for that.