FeatureFileEnum

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The FeatureFileEnum function builds a list of the files in a component associated with the specified feature or a list of the components associated with a particular feature.

Note: This function cannot be used with script-created feature sets.

Syntax

FeatureFileEnum ( szFeatureSource, szFeature, szQuery, listFilesorComponents, nOption );

Parameters

FeatureFileEnum Parameters

Parameter

Description

szFeatureSource

Pass MEDIA in this parameter.

szFeature

Specifies the name of the feature to be enumerated. Do not pass a null string ("") in this parameter. FeatureFileEnum requires a specific feature name.

szQuery

To query the components in a particular feature, specify a component specification (same format as a file specification). Delimit the component specification with double backslashes and enclose the expression in double quotation marks.

The component specification can include wild-card characters: an asterisk (*) as a substitute for zero or more characters, or a question mark (?) as a substitute for a single character. The following example specifies all of the components in the feature specified in szFeature:

"*.*"

To query the files in a particular component, specify a component name and a file specification. Delimit the component name and the file specification with double backslashes and enclose the expression in double quotation marks. You can also specify only a file specification. The file name part of the file specification may include wild-card characters. The following example specifies all of the files in the component Graphic_Examples:

"Graphic_Examples\\*.*"

Note: There are limitations when using this functionality in InstallScript MSI installations (both when querying components and files), because complex wild-card expressions are not supported.

When querying files, you must specify one of the following as szQuery:

<Component Name>\*.*
<Component Name>\<Complete File Name>
<Component Name>\*.<Extension>
<Component Name>\<File Name>.*

When querying components, you must specify one of the following as szQuery:

*.*
<Complete Component>

listFilesOrComponents

When querying components, returns a list of the components that match szQuery. When querying files, returns a list of the names of all files that match szQuery. The string list identified by listFilesOrComponents must already have been initialized by a call to ListCreate.

nOption

Pass NO_SUBDIR in this parameter. Note that nOptions is ignored when querying the list of components.

Return Values

FeatureFileEnum Return Values

Return Value

Description

0

FeatureFileEnum was successful.

<0

FeatureFileEnum failed.

See Also