Conditionally Setting the Visibility of a Suite Feature at Run Time

InstallShield 2018

Project • This information applies to the following project types:

Advanced UI
Suite/Advanced UI

You can conditionally show or hide a feature of a suite project based upon a property at run time using the Condition option under the Visible property on the Features view of the Installation Designer.

You can use the Condition setting to specify one or more conditions that the Advanced UI or Suite/Advanced UI installation should use to evaluate whether the feature should be visible for installation by default on the InstallationFeatures wizard page.

For example, if you want a particular feature to be visible by default on target systems that have a particular version of Windows, you can create a condition that specifies that version of Windows.

To conditionally display a feature in an Advanced UI or Suite/Advanced UI installation:

1. On the Features view, click in the Condition row under the Visible property. A green plus sign, the New Condition button, appears at the end of the row.
2. Click the New Condition button. A new row is added under the Condition row.
3. Click the down arrow next to the New Condition button and select the appropriate option—All, Any, or None—from the list.
4. Then in the same row, click the New Condition button, and select the appropriate option to continue building the conditional statement.

If one or more conditional statements are configured, the Condition property lists (Condition). If none are configured, the Condition property lists (Empty).

For more information, see Building Conditional Statements in Advanced UI and Suite/Advanced UI Projects.

Methods in Automation Interface to Support Conditional Visibility

You can also use the following methods in the automation interface to conditionally set the visibility of a feature in a suite project at run time:

Automation Interface Methods to Support Conditional Visibility in Suite Projects

Method

Syntax

AddVisibleCondition

AddVisibleCondition() As ISWiSuiteCondition

DeleteVisibleCondition

DeleteVisibleCondition()

VisibleCondition

Read-only object property