FeatureSetData

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureSetData function sets properties and data for the specified feature. Most of the settings correspond to the properties in the Features view.

Syntax

FeatureSetData ( szFeatureSource, szFeature, nInfo, nData, szData );

Parameters

FeatureSetData Parameters

Parameter

Description

szFeatureSource

Specifies the media name of the script-created feature set or (in InstallScript projects) file media library that contains the feature for which properties and data are to be set.

szFeature

Specifies the name of the feature. For more information about specifying features and subfeatures in InstallScript, see Specifying Features and Subfeatures in Function Calls.

nInfo

Specifies the type of information to be set. Pass one of the following predefined constants in this parameter:

FEATURE_FIELD_DESCRIPTION—This text is displayed in the Description field of selection dialogs.
FEATURE_FIELD_FTPLOCATION—An FTP location.
FEATURE_FIELD_HTTPLOCATION—An HTTP location.
FEATURE_FIELD_STATUS (not for script-created feature sets)—This text is displayed in the progress indicator during file transfer.
FEATURE_FIELD_VISIBLE—Indicates whether or not the feature is visible in a feature selection dialog. The parameter nData can be one of the following:

TRUE: The feature is visible.

FALSE: The feature is not visible.

FEATURE_FIELD_SELECTED—Sets the selection status of the feature. This setting has the same effect as FeatureSelectItem. The parameter nData can be one of the following:

TRUE: Select the feature.

FALSE: Do not select the feature.

FEATURE_FIELD_SIZE (not for file media)—The total original file size for the feature.
FEATURE_FIELD_MISC—Miscellaneous text.
FEATURE_FIELD_DISPLAYNAME (not for object projects)—Indicates the name displayed in feature selection dialogs for the feature specified in szFeature.
FEATURE_FIELD_IMAGE—Overrides a feature's default icon assignment. Pass the index of the icon to display in nData. To specify that no icon should be displayed for the feature, pass -1 in nData.

nData

Specifies a numeric value to set when the information indicated by nInfo is numeric.

szData

Specifies a string value to set when the information indicated by nInfo is a string.

Return Values

FeatureSetData Return Values

Return Value

Description

0

FeatureSetData was successful.

< 0

FeatureSetData failed. Call FeatureError for additional information.

You can obtain the error message text associated with a large negative return value—for example, -2147024891 (0x80070005)—by calling FormatMessage.

See Also