FeatureGetData

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureGetData function retrieves information about a feature.

Syntax

FeatureGetData ( szFeatureSource, szFeature, nInfo, nvResult, svResult );

Parameters

FeatureGetData 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 information is retrieved.

szFeature

Specifies the name of the feature from which information is retrieved. To learn how to refer to top-level features and subfeatures, see Specifying Features and Subfeatures in Function Calls.

nInfo

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

FEATURE_FIELD_CDROM_FOLDER—For a CD-ROM media type, the location of the feature’s data on the CD-ROM. Only InstallScript projects support this constant; InstallScript MSI projects do not. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_DESCRIPTION—The description displayed when the feature is selected in a feature selection dialog. This is the text from the feature’s Description property.
FEATURE_FIELD_DISPLAYNAME—The feature name displayed in the selection dialogs. This is the value in the feature’s Display Name setting.
FEATURE_FIELD_ENCRYPT—Specifies whether the feature is encrypted. Only InstallScript projects support this constant; InstallScript MSI projects do not. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_FILENEED—Defines how critical the feature files are for the installation. Only InstallScript projects support this constant; InstallScript MSI projects do not.
FEATURE_FIELD_FLAGS—Indicates the flags that are set for the feature. Only InstallScript projects support this constant; InstallScript MSI projects do not. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_FTPLOCATION—Specifies an FTP location. This value is stored in the feature’s FTP Location setting.
FEATURE_FIELD_GUID—The GUID that is associated with the feature. Only InstallScript projects support this constant; InstallScript MSI projects do not. This constant is available for file media libraries, not for script-created feature sets.

nInfo (cont.)

FEATURE_FIELD_HANDLER_ONINSTALLED—The name of the OnInstalled event for the feature. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_HANDLER_ONINSTALLING—The name of the OnInstalling event for the feature. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_HANDLER_ONUNINSTALLED—The name of the OnUninstalled event for the feature. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_HANDLER_ONUNINSTALLING—The name of the OnUninstalling event for the feature. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_HTTPLOCATION—Specifies an HTTP location. This value is stored in the feature’s HTTP Location setting.
FEATURE_FIELD_IMAGE—Specifies the index of the icon to be displayed in nvResult. If no icon should be displayed for the feature, nvResult returns -1.
FEATURE_FIELD_MISC—Miscellaneous text. This field can be useful at run time because you can use it to flag or identify features using any information you want.
FEATURE_FIELD_PASSWORD—Specifies whether a password is associated with the feature. This constant is available for file media libraries, not for script-created feature sets. Only InstallScript projects support this constant; InstallScript MSI projects do not.
FEATURE_FIELD_SELECTED—Indicates whether the feature specified in szFeature is selected.
FEATURE_FIELD_SIZE—Total original file size for the feature specified in szFeature. This constant is available for file media libraries, not for script-created feature sets.
FEATURE_FIELD_STATUS—In InstallScript installations, this text is displayed in the progress indicator during file transfer. This constant is available for file media libraries, not for script-created feature sets. In InstallScript MSI installations, the feature’s display name is returned.
FEATURE_FIELD_VISIBLE—Determines whether the feature that is specified in szFeature is visible in the selection dialog. This value is stored in the feature’s Display setting.

nvResult

Returns a numeric value when nInfo produces a numeric result.

When nInfo is FEATURE_FIELD_FILENEED, nvResult returns one of the following values:

FEATURE_VALUE_CRITICAL—This feature contains critical files.
FEATURE_VALUE_HIGHLYRECOMMENDED—This feature is highly recommended.
FEATURE_VALUE_STANDARD—This feature may or may not be included.

When nInfo is FEATURE_FIELD_FLAGS, nvResult returns one of the following values:

FEATURE_DATA_FLAG_PASSWORD—The feature is password protected.
FEATURE_DATA_FLAG_PASSWORD_VALIDATED—The feature’s password has been validated. (The installation is using FeatureValidate or the feature is not password protected.)
FEATURE_DATA_FLAG_DATA_AS_FILES—The feature’s files are placed in a particular folder for a CD-ROM type of release.
FEATURE_DATA_FLAG_SPLIT_AFTER—This flag is set only for build-generated features.
FEATURE_DATA_FLAG_SPLIT_BEFORE—This flag is set only for build-generated features.
FEATURE_DATA_FLAG_SPLIT_BEFORE_NOT_ALLOWED—This flag is set only for build-generated features.
FEATURE_DATA_FLAG_SPLIT_NOT_ALLOWED—This flag is set only for build-generated features.
FEATURE_DATA_FLAG_VISIBLE—The feature is visible.
FEATURE_DATA_FLAG_VOLATILE—The feature is volatile.
FEATURE_DATA_FLAG_ENCRYPTED—The feature is encrypted.

When nInfo is FEATURE_FIELD_PASSWORD, nvResult returns one of the following values:

TRUE—The feature is password protected. If the feature is password protected, you must get the correct password from the end user and validate it with FeatureValidate before calling FeatureTransferData to transfer the files in the file media library.
FALSE—The feature is not password protected.

When nInfo is FEATURE_FIELD_SELECTED, nvResult returns one of the following values:

TRUE—This feature is selected.
FALSE—This feature is not selected.

When nInfo is FEATURE_FIELD_VISIBLE, nvResult returns one of the following values:

TRUE—This feature is visible.
FALSE—This feature is not visible.

svResult

Returns a string value when nInfo produces a string result.

Return Values

FeatureGetData Return Values

Return Value

Description

0

FeatureGetData was successful.

< 0

FeatureGetData 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