Condition Table

The Condition table can be used to modify the selection state of any entry in the Feature table based on a conditional expression.

The Condition table has the following columns.

Column Type Key Nullable
Feature_ Identifier Y N
Level Integer Y N
Condition Condition N Y

 

Columns

Feature_

External key into column one of the Feature table.

Level

A conditional install level for the feature in the Feature_ column of this table. The installer sets the install level of this feature to the level specified in this column if the expression in the Condition column evaluates to TRUE.

Condition

If this conditional expression evaluates to TRUE, then the Level column in the Feature table is set to the conditional install level.

The expression in the Condition column should not contain reference to the installed state of any feature or component. This is because the expressions in the Condition column are evaluated before the installer evaluates the installed states of features and components. Any expression in the Condition table that attempts to check the installed state of a feature or component always evaluates to false.

For information on the syntax of conditional statements, see Conditional Statement Syntax.

Remarks

A feature can be permanently disabled by setting the Level column to 0.

The Level may be set based on any conditional statement, such as a test for platform, operating system, or a particular property setting.

Conditions should be carefully chosen so that a feature is not enabled on install and then disabled on uninstall. This will orphan the feature and the product will not be able to be uninstalled.

This table is referred to when the CostFinalize action is executed.

If the Preselected property has been set to 1, the installer does not evaluate the Condition table. The Condition table affects only the installation of features when none of the following properties have been set:

ADDLOCAL
REMOVE
ADDSOURCE
ADDDEFAULT
REINSTALL
ADVERTISE
COMPADDLOCAL
COMPADDSOURCE
COMPADDDEFAULT
FILEADDLOCAL
FILEADDSOURCE
FILEADDDEFAULT

Validation

ICE03
ICE06
ICE32
ICE46
ICE79
ICE86