OnRMFilesInUse

InstallShield 2020 ยป InstallScript Language Reference

Project:This information applies to InstallScript MSI projects.

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

Note that the INSTALLMESSAGE_RMFILESINUSE message is not sent if the Restart Manager is unavailable or disabled. For more information, see MSIRESTARTMANAGERCONTROL Property in the Windows Installer Help Library.

If the Restart Manager is unavailable or disabled, or if the target system has Windows Installer 3.x or earlier, Windows Installer sends an INSTALLMESSAGE_FILESINUSE message to the installation.

By default, the OnRMFilesInUse event handler displays the SdRMFilesInUse dialog. The event handler returns the value that the dialog returns, and the value is then passed back to the Windows Installer to indicate how the message was handled and what action the Windows Installer should take.

Syntax

OnRMFilesInUse (szMessage);

Parameters

OnRMFilesInUse Parameters

Parameter

Description

szMessage

String provided by the Windows Installer indicating the files that are in use. The SdRMFilesInUse function parses this string.

Return Values

OnRMFilesInUse Return Values

Return Value

Description

IDCANCEL

Indicates that the installation should be cancelled.

IDRETRY

Indicates that the Windows Installer should recheck for in-use files and send the INSTALLMESSAGE_RMFILESINUSE message if it still needed.

Note:Unlike the SdFilesInUse dialog, the SdRMFilesInUse dialog does not return this value.

IDIGNORE

Indicates that the Windows Installer should ignore the fact that the files are in use and should continue the installation.

IDOK

Indicates that the Windows Installer should use the Restart Manager to attempt to shut down running applications that are locking files. For more information, see INSTALLMESSAGE_RMFILESINUSE in the Windows Installer Help Library.

See Also