SdFeatureTree

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdFeatureTree function displays a dialog that contains the following:

A tree control in which end users can select the features they want on their system and clear the features they do not want on their system.
A description of the selected feature—the text in the feature’s Description property.
The drive space required to perform the file operations selected in the tree control, and the space available on the drive of the path specified by szDir. The calculation of required drive space takes into account the cluster size on the szDir drive.

Syntax

SdFeatureTree ( szTitle, szMsg, szDir, szFeatures, nLevel );

Parameters

SdFeatureTree Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title ("Select Features"), pass a null string ("") in this parameter.

szMsg

Specifies the message to display in the dialog. To display the default instructions for this dialog, pass a null string ("") in this parameter.

szDir

Specifies the path that is used in calculating required and available drive space. The script variable TARGETDIR should always be specified for this parameter.

szFeatures

Specifies the name of the feature whose subfeatures are displayed. To display all top-level features, pass a null string ("") in this parameter. To learn how to refer to top-level features and subfeatures, see Specifying Features and Subfeatures in Function Calls.

nLevel

Specifies how many levels of features and subfeatures are open in the tree control when the dialog is first displayed. (For example, an nLevel of 2 causes third- and lower-level subfeatures to be closed in the tree control when the dialog is first displayed.)

Return Values

SdFeatureTree Return Values

Return Value

Description

NEXT (1)

Indicates that the end user clicked the Next button.

BACK (12)

Indicates that the end user clicked the Back button.

Additional Information

To view an example of this or other dialogs for your installation, use the Dialog Sampler. In InstallShield, on the Tools menu, point to InstallScript, then click Standard Dialog Sampler or Skinned Dialog Sampler.
The required disk space displayed by the dialog includes the size of the files that must be installed to enable maintenance installations and uninstallation. Even if all application features are deselected, the size of these files is still displayed.
SdFeatureTree operates on the current media, which is specified by the system variable MEDIA. During setup initialization, the installation assigns to MEDIA a media name that is associated with your file media library (Data1.cab).

To display script-created features:

1. Save the current value of MEDIA in a string variable, for example, szSaveMEDIAValue.
2. Assign to MEDIA the name of the script-created component set.
3. Call SdFeatureTree to get end-user selections.
4. Assign to MEDIA the value that you saved in step 1. You must do this before calling FeatureTransferData.

See Also