OnFileError

InstallShield 2016 » InstallScript Language Reference

Project • This information applies to InstallScript projects.

The OnFileError event handler responds to the FileError event that is generated when the setup encounters a file error that does not generate any other file error event (for example, FileLocked or FileReadOnly). When creating an InstallShield object, note that this event is not triggered in an object.

This event handler is called (when appropriate) in any setup, including a setup that uses a procedural script (a script with a program…endprogram block).

Syntax

OnFileError ( szFilename, nError );

Parameters

OnFileError Parameters

Parameter

Description

szFilename

Specifies the fully qualified file name of the file for which the error occurred.

nError

Specifies the value returned by the Windows API function GetLastError when the error occurred.

Return Values

OnFileError Return Values

Return Value

Description

ERR_IGNORE

Returned to the setup by the OnFileError event handler to request that the setup ignore the failure to install or uninstall the file specified in OnFileError’s first argument and continue without performing the operation.

ERR_RETRY

Returned to the setup by the OnFileError event handler to request that the setup attempt again to install or uninstall the file specified in OnFileError’s first argument.

ERR_ABORT

Returned to the setup by the OnFileError event handler to request that the setup be aborted.