SdAskDestPath

InstallShield 2014 » InstallScript Language Reference

Project: This information applies to the following project types:

InstallScript
InstallScript MSI

The SdAskDestPath function creates a dialog that allows the end user to select an alternate destination path. When the end user clicks Browse in this dialog, the SelectDir function is called to open a second dialog that enables the end user either to select an existing folder or to enter a new folder name.

Syntax

SdAskDestPath ( szTitle, szMsg, svDir, nReserved );

Parameters

SdAskDestPath Parameters

Parameter

Description

szTitle

Specifies the title of the dialog. To display the default title (“Choose Folder”), pass a null string (“”) in this parameter.

szMsg

Specifies the text to display in the dialog. The text is considered a static control. Use the %P place holder in your message string to insert the product name (if any) that has been specified by a previous call to SdProductName. To display the default instructions for this dialog, pass a null string ("").

svDir

Specifies the name of the directory to be selected by default. Returns the name of the directory selected by the end user.

nReserved

Pass zero in this parameter. No other value is allowed.

Return Values

SdAskDestPath 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.
If the end user specifies an incomplete, invalid, or write-protected path in the second dialog, an error message is displayed. If you want the end user to be able to select folders that are not writable, call the AskPath function instead.
Setups that run in silent mode should create the new folder if it does not exist before calling SdAskDestPath. This ensures that the confirmation dialog is not displayed. Without this step, two response files are required to handle the two possible conditions.
In earlier versions of InstallShield Professional, when the end user selected in the Choose Folder dialog a folder that did not exist, a confirmation message box was displayed asking whether the folder should be created. This message box proved to be confusing to many end users, so it has been removed from InstallShield.

See Also