SelectFolder

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SelectFolder function displays a dialog that enables the end user to enter the name of a program folder in an edit field or select a program folder from a list. The function automatically displays all program folders on the system. A default folder name passed in svDefFolder is displayed in the edit field. The selected folder name is returned in svResultFolder.

Caution: If the specified folder does not exist, you must call CreateProgramFolder to create it; SelectFolder will not create the folder.

Syntax

SelectFolder ( szTitle, szDefFolder, svResultFolder );

Parameters

SelectFolder Parameters

Parameter

Description

szTitle

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

szDefFolder

Specifies the name of the folder to display as the default folder.

svResultFolder

Returns the name of the folder selected or specified by the end user.

Return Values

SelectFolder 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.

< 0

Indicates that the function was unsuccessful.

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.

See Also