OnFileLocked

InstallShield 2018 » InstallScript Language Reference

Project • This information applies to InstallScript projects.

The OnFileLocked event handler responds to the FileLocked event that is generated when the setup encounters a locked (in use) file that must be deleted or overwritten. When creating an InstallShield object, note that this event is not triggered in an object.

This event handler is not called for files that are in components whose Potentially Locked property is set to Yes. In this case the file operation is automatically performed after reboot.

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

OnFileLocked ( szFilename );

Parameters

OnFileLocked Parameters

Parameter

Description

szFilename

Specifies the fully qualified file name of the locked file.

Return Values

OnFileLocked Return Values

Return Value

Description

ERR_IGNORE

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

ERR_RETRY

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

ERR_ABORT

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

ERR_PERFORM_AFTER_REBOOT

Returned to the setup by the OnFileLocked event handler to request that the setup perform the operation on the file after the target system is rebooted.