Miscellaneous Event Handlers

InstallShield 2016 » InstallScript Language Reference

Miscellaneous event handlers are triggered by unscheduled events during an installation, such as the end user exiting the installation.

Miscellaneous Event Handlers

Event Handler

Project Type

Description

OnAbort

InstallScript, InstallScript MSI

In InstallScript projects: The OnAbort event handler is called when a setup is aborted via the abort keyword.

In InstallScript MSI projects: Responds to the Abort event generated by InstallScript's abort command.

OnAdminInstallUIAfter

InstallScript MSI

Responds to the Admin Install UI After event.

OnAdminInstallUIBefore

InstallScript MSI

Responds to the Admin Install UI Before event by displaying dialogs that gather information from the end user for an administrative installation of an application.

OnAdminPatchUIAfter

InstallScript MSI

Called after the file transfer of an administrative patch.

OnAdminPatchUIBefore

InstallScript MSI

Called before the file transfer of an administrative patch.

OnAdvertisementAfter

InstallScript MSI

Responds to the Advertisement After event.

OnAdvertisementBefore

InstallScript MSI

Responds to the Advertisement After Before event.

OnCanceling

InstallScript, InstallScript MSI

InstallScript projects: The OnCanceling event is sent when the installation is cancelled, usually as result of the end user clicking the Cancel button of a dialog or pressing the Esc key. Calling Do(EXIT) will also trigger this event.

In InstallScript MSI projects: Responds to the Cancel event generated when the end user clicks the Cancel button in a built-in dialog.

OnComponentError

InstallScript, InstallScript MSI

In InstallScript projects: The OnComponentError event is called by the framework when the call to FeatureTransferData or FeatureMoveData returns an error.

In InstallScript MSI projects: Responds to general file-transfer errors.

OnDIFxLogCallback

InstallScript

Called when a DIFx-related event occurs that is logged by the built-in DIFx callback functionality.

OnError

InstallScript MSI

This event is called when MSI sends an INSTALLMESSAGE_ERROR message.

OnException

InstallScript MSI

Responds to exceptions generated by a procedural script.

OnFileError

InstallScript

The OnFileError event is sent when an unknown error occurs during the installation or uninstallation of a file.

OnFileLocked

InstallScript

The OnFileLocked event is called when a file that is in use by another application needs to be installed or uninstalled unless the files are in a file group which is potentially marked as locked or shared. In that case, the file will be installed or uninstalled after reboot.

OnFileReadOnly

InstallScript

The OnFileReadOnly event is called when a read-only file needs to be installed or uninstalled.

OnFilesInUse

InstallScript MSI

The OnFilesInUse event handler is called in when the Windows Installer sends an INSTALLMESSAGE_FILESINUSE message to the installation.

By default, the OnFilesInUse event handler displays the SdFilesInUse dialog.

OnHelp

InstallScript, InstallScript MSI

In InstallScript projects: The OnHelp event is called when the end user presses F1 or Do(HELP) is called.

In InstallScript MSI projects: Responds to the Help event generated when the end user presses the F1 key.

OnInternetError

InstallScript

The OnInternetError is called when an error occurs while installing a file from the Internet.

OnLaunchAppAndWaitCallback

InstallScript, InstallScript MSI

The OnLaunchAppAndWaitCallback is called while the installation is waiting for an application to launch if LAAW_OPTION_USE_CALLBACK was specified when calling the LaunchAppAndWait function.

OnLogonUserSetMsiProperties

InstallScript MSI

The OnLogonUserSetMsiProperties event handler sets the Windows Installer properties for the logon user support that is described for InstallScript MSI projects in Adding the Ability to Create or Set an Existing User Account.

OnMD5Error

InstallScript

The OnMD5Error event is called when the MD5 signature of a file being installed does not match the MD5 value stored in the InstallShield CAB file. (The MD5 is calculated when the media is built.)

OnMsiSilentInstall

InstallScript MSI

Responds to the MSI Silent Install event generated when a user runs an InstallScript MSI project's .msi package in silent mode.

OnNextDisk

InstallScript

The OnNextDisk event is called during file transfer when the setup cannot find a data file that is needed. An example of this occurrence is during a multiple floppy or CD install when the next disk is needed.

OnOutOfDiskSpace

InstallScript MSI

Responds to the target system running out of free disk space.

OnPatchUIAfter

InstallScript MSI

Responds to the Patch UI After event.

OnPatchUIBefore

InstallScript MSI

Responds to the Patch UI Before event by displaying dialogs for a patch installation.

OnRebooted

InstallScript, InstallScript MSI (if the InstallScript user interface (UI) style is the traditional style, which uses the InstallScript engine as an external UI handler)

In InstallScript projects: The OnRebooted event is called when the setup is run automatically after rebooting the system. This is the only event that will be called in this case.

In InstallScript MSI projects: Responds to the Rebooted event that the installation generates when it restarts after the target system is rebooted.

Important • This event is not called in an InstallScript MSI installation in which the InstallScript UI style is the new style (which uses the InstallScript engine as an embedded UI handler). To learn more, see Using the InstallScript Engine as an External vs. Embedded UI Handler for InstallScript MSI Installations.

OnRemovingSharedFile

InstallScript

The OnRemovingSharedFile event is called during file transfer when a shared file is being uninstalled and the reference count for the file has reached zero.

OnResumeUIAfter

InstallScript MSI

Responds to the Resume UI After event.

OnResumeUIBefore

InstallScript MSI

Responds to the Resume UI Before event.

OnRMFilesInUse

InstallScript MSI

The OnRMFilesInUse event handler is called when the Restart Manager is enabled and Windows Installer 4.0 sends an INSTALLMESSAGE_RMFILESINUSE message to the installation.

By default, the OnRMFilesInUse event handler displays the SdRMFilesInUse dialog.

OnSelfRegistrationError

InstallScript

The OnSelfRegistrationError event handler is called directly by the framework when a call to Do(SELFREGISTRATIONPROCESS) fails to register files successfully.

OnWarning

InstallScript MSI

Responds to the Warning event generated when the Windows Installer service sends an INSTALLMESSAGE_WARNING message to the installation's user interface.

See Also