EnterDiskError

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to the following project types:

Basic MSI
InstallScript
InstallScript MSI

The EnterDiskError function checks whether a specified path and file exists. The function displays an appropriate error if the file does not exist in the specified path; then it returns success or failure, depending on whether the specified file exists.

Tip • EnterDiskError can also check for the presence of a specific path, without a particular file.

Syntax

EnterDiskError (byval string szPath, byval string szFile);

Parameters

EnterDiskError Parameters

Parameter

Description

szPath

Specify the path to be checked.

szFile

Specify the name of the file to be checked.

If you want EnterDisk to check for just the path, but not a specific file, specify a null string ("").

Return Values

EnterDiskError Return Values

Return Value

Description

>= ISERR_SUCCESS

The specified path and file exist.

< ISERR_SUCCESS

The specified path and file do not exist.

Additional Information

Since the EnterDiskError function is typically called only internally by the EnterDisk function, it does not include any silent mode handling, other than the normal MessageBox silent mode handling.

By default, the dialog displays the same error message and the default message box title for the installation, regardless of the error that occurs. You can change this behavior by calling the SetErrorTitle and SetErrorMsg functions with nErrorId set as follows:

ERR_BOX_DISKID—Customize the title or message displayed when the specified disk does not exist.
ERR_BOX_BADPATH—Customize the title or message displayed when the specified path does not exist.
ERR_BOX_BADTAGFILE—Customize the title or message displayed when the specified file does not exist. (If a null string ("") is specified for szFile, no error check occurs, and no message is displayed.)

See Also