Feature attributes

Reference information
Project page Components and Features
Related topics Working with attribute panes

Introduction

A Feature defines a piece of functionality that the customer can select or not select for installation. A feature can contain subfeatures in a hierarchical fashion; internally, a feature also contains references to the components that must be installed to provide the functionality that the feature offers.

Attributes

This pane contains the following attributes and options.

Attribute Description
Feature name

Enter the name of the feature. This name is used to refer to the feature in conditional expressions elsewhere in the project, but is not visible to the user. Each feature must have a name that is unique within the project.

Display title

Enter the name of the feature for display in the installer's user interface, either a SelectionTree (Windows Installer) or FeatureTree control (Tarma Installer).

Description Enter the description of the feature for display in the installer's user interface.
Folder alias

Enter the folder alias of the installation folder that is associated with the feature, or click ... (browse) to open the Select Installation Folder dialog box that allows you to select one. The path to this folder can be configured in the installer's user interface if you select the Allow folder browsing option (below).

Condition

Enter a conditional expression that determines the feature state during installation, or leave empty if the feature state is unconditional. Depending on the condition, the feature's state is set to either Initial state or New state (see below).

MSI note Windows Installer evaluates feature conditions during its CostFinalize standard action.

Tarma note Tarma Installer evaluates feature conditions during its InitFeatures standard action.

Build condition

Enter a conditional expression that determines if the feature will be included in the build, or leave empty if the feature must be included in all builds. The build condition is evaluated during the preflight test for each build configuration (Tarma and MSI); you can use the Build variables attribute in the TSU Configuration and MSI Configuration panes to control if the feature will be included for a particular configuration.

If the condition evaluates to false, the feature and all its subfeatures are excluded from the build process for the configuration. This in turn might cause one or more components and their objects to be excluded as well.

Mutually exclusive subfeatures

Check this box to configure the feature's subfeatures as mutually exclusive; clear it for regular subfeatures. Mutually exclusive subfeatures appear as radio buttons instead of check boxes; only one mutually exclusive subfeature can be selected at a time.

MSI note Windows Installer does not support mutually exclusive subfeatures; all subfeatures will appear and behave as regular features.

Allow folder browsing

Check this box to allow the user to select the folder path for the feature's folder as defined by its Folder alias attribute; clear it to prevent folder browsing.

MSI note Windows Installer requires a Browse PushButton control linked to a SelectionBrowse Control Event to implement folder browsing. The default CustomizeDlg dialog box contains this control.

Tarma note Tarma Installer implements folder browsing by linking an EditText control to the appropriate folder alias, optionally combined with a Browse for Folder Standard Dialog action. The control or dialog should be linked indirectly to the TsuFeatureFolderAlias variable to follow the currently selected feature in the FeatureTree control, or linked directly to any other folder alias variable. The default OptionsDlg dialog box demonstrates this.

Initial state

Select the initial feature state from the drop-down list. The following choices are available:

Initial state Description
Unavailable (0)

The feature is unavailable and will not be displayed in the installer's user interface.

Note: This only applies if the feature state is set before a FeatureTree (Tarma Installer) or SelectionTree (Windows Installer) control is shown. If the feature state changes to Unavailable while the control is present, the feature will be shown as Disabled.

Disabled (32767) The feature is unavailable, but displayed in the installer's user interface.
Not selected (32766) The feature is available, but not selected.
Selected (100) The feature is selected.
Always selected (1) The feature is always selected.

(The numbers between parentheses indicate the feature level as used by Windows Installer.) The initial feature state is used if the feature's Condition attribute is empty, or if the condition evaluates to false.

MSI note Windows Installer does not support all feature state variations listed here. In particular, all states except Unavailable can be selected or unselected by the user or by changing the INSTALLLEVEL property.

New state

Select the feature state for the feature if the Condition attribute evaluates to true. The choices are the same as for Initial state.

Extra size

Enter the additional installation size (in bytes) for the feature, or leave empty if the feature only installs what its components and subfeatures contain.

This option is useful if you use the feature as a user-selectable option that is used in custom actions to download, copy, or otherwise install additional files. Setting this option to the (approximate) additional installation size then helps the user and the installer to estimate the required total installation size.

MSI note Windows Installer does not support this option.