InstallShield 2016
Project • This information applies to the following project types:
• | Basic MSI |
• | InstallScript |
• | InstallScript MSI |
• | MSI Database |
• | Transform |
The procedure for conditionally hiding features at run time depends on the project type that you are using.
Basic MSI, MSI Database, and Transform Projects
Any feature given an Install Level of zero will be hidden (and deselected).
For example, to hide a feature if the end user running your installation does not have administrative privileges:
1. | In the View List under Organization, click Setup Design or Features. |
2. | Select the feature that you want to configure. |
3. | Click the Condition setting and then click the ellipsis button (...). The Feature Condition Builder dialog box opens. |
4. | Click the New Condition button. InstallShield adds a new condition row to the Conditions box. |
5. | In the Level column, type 0. |
6. | In the Condition column, type Not AdminUser. |
7. | Click OK. |
After rebuilding your project and running the installation, the feature will not be displayed or installed if the end user does not have administrative privileges.
InstallScript and InstallScript MSI Projects
The FeatureSetData function accepts a FEATURE_FIELD_VISIBLE constant that lets you control whether a specific feature is displayed. For example, to hide a feature called HiddenFeature, include the following function call in your script:
FeatureSetData (MEDIA,
"HiddenFeature",
FEATURE_FIELD_VISIBLE, FALSE,
"");
Note • Hiding a feature does not automatically deselect it. To deselect the feature so that its data is not installed, call the following:
FeatureSelectItem(MEDIA, "FeatureName", FALSE);
See Also
InstallShield 2016 Help LibraryAugust 2016 |
Copyright Information | Flexera Software |