Learner
Learner

Reputation: 49

Install Shield - How to Disable specific feature in feature tree?

I am new to install shield, I have an Install Script msi project and have some features, I want feature3 to be greyed out in sdfeaturestree dialog.

Kindly help me in to this I am very stucked. kindly tell me the function which disable the check box of specified feature?

Upvotes: 1

Views: 6259

Answers (2)

svives
svives

Reputation: 82

You could use InstallScript:

if( yourCondition ) then 
     FeatureSetData (MEDIA, "FeatureName", FEATURE_FIELD_VISIBLE, FALSE, szData); 
endif; 

This way you can hide the feature. If you want to de-select the feature you could use FEATURE_FIELD_SELECTED instead of FEATURE_FIELD_VISIBLE.

You could also do this by going to the Feature tree of your installer, select the feature you want to be greyed out, and add some conditions that change the installlevel; you can find an explanation of the installlevel in the following URL:

http://msdn.microsoft.com/en-us/library/aa369536(v=vs.85).aspx

Hope this helps!

Upvotes: 2

robertdickau
robertdickau

Reputation: 111

I don't think there's a function to disable a feature. Common practice is to use the Required Features property, where a hidden feature requires the one you want to gray out.

Upvotes: 3

Related Questions