MSI DLL Custom Action Settings

InstallShield 2019 Express Edition

When you add a Windows Installer DLL (MSI DLL) custom action to your project in the Custom Actions view, you need to configure its settings.

Settings for MSI DLL Custom Actions

Settings

Description

Source Location

Specify where the file that is used for this custom action is located:

Browse File System—The file that is used for this custom action is on your system.
Installed with the Product—The file will be installed on the target system.

Depending on which part of the installation, uninstallation, or maintenance you schedule the custom action, this option may not be available. For example, if you schedule the custom action for the Before File Transfer part of the installation—which occurs before the file has been installed on the target system—the Installed with the Product option is not available.

File Name

If you selected Browse File System in the Source Location setting, click the ellipsis button (...) in the File Name setting to browse to the DLL file that you want to use for the custom action. When you build your installation, this file is automatically incorporated into your installation. Although the custom action is run during installation, the file is removed following installation.

If you selected Installed with the Product in the Source Location setting, click the ellipsis button (...) in the File Name setting to browse for the file from the list of files that have already been added to your project through the Files view. Files that are installed on the target system are launched from their destination on the target system.

Function Name

Enter the name of the entry-point function that you want to call from your Windows Installer DLL.

Note that the function must be defined with the following signature:

UINT __stdcall FunctionName (MSIHANDLE hInstall) {...}

The function name can vary; however, the return type, calling convention, and single parameter must use the types that are specified in the aforementioned signature. The MSIHANDLE data type that is used in the function signature is a handle to the running installation.

In-Script Execution

Select the iteration of the sequence that should trigger the selected custom action. For detailed information about each option, see Action Execution Options.

Note that this setting does not apply to some sequences. For example, if you add a custom action under After Initialization (before first dialog), the action will be scheduled for immediate execution; it cannot be scheduled for deferred, rollback, or commit execution.

Wait For Action

Specify whether you want the installation, uninstallation, or maintenance to wait until the custom action exists before proceeding with the rest of the installation.

If you select No, the installation, uninstallation, or maintenance continues while your custom action runs.

Ignore Exit Code

Specify whether you want the Windows Installer to ignore the return value of this custom action and continue the installation, uninstallation, or maintenance.

Comments

Enter comments about this custom action. These comments are for your reference only and are not displayed to end users.

Condition

This setting lets you specify one or more conditions that must be true in order for the selected custom action to be run. For example, you can create a condition that checks the target system for a specific operating system or minimum system requirements. If the conditions evaluate to True at run time, the custom action is run. If one or more of the conditions evaluate as False, the custom action is not run.

To specify one or more conditions, click the ellipsis button (...) in this setting.

When you add a condition, InstallShield adds a new setting under the Condition setting. This new setting displays the conditional statement for the condition that you added.

To edit or delete a condition, click the ellipsis button (...) in the Condition setting.

See Also