Executable File Custom Action Settings

InstallShield 2019 Express Edition

When you add a custom action that launches an .exe file to the Custom Actions view, you need to configure its settings.

Settings for Executable File Custom Actions

Setting

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, the Installed with the Product 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 Exists on Target System—The file already exists on the target system.

Tip • If you select File Exists on Target System and specify [SUPPORTDIR] for the File Location setting, you can launch a file that you added in the Setup Files view as a custom action.

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 .exe 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.

This setting is displayed if you selected one of the following options for the Source Location setting:

Browse File System
Installed with the Product

File Location

Select the folder on the target system that contains the executable file that you want to be launched, or click the ellipsis button (...) to select or create the folder.

For example, if you want to launch Notepad.exe, enter [SystemFolder] in the File Location setting, and enter Notepad.exe in the File Name and Command Line setting.

This setting is displayed if you selected File Exists on Target System for the Source Location setting.

Command Line

Enter any command-line parameters that you want to pass to your executable file. For example, if you select Notepad as your executable file, you can pass a file name at the command line to open the file when the executable file is launched. In this case, you might enter E:/Readme.txt in order to launch a readme file. Enclose long file names in quotation marks.

This setting is displayed if you select one of the following options for the Source Location setting:

Browse File System
Installed with the Product

File Name and Command Line

Enter the name of the file. Do not add a directory before the file name—this is provided in the File Location setting. After the file name, enter any command line that you want to send to the executable file.

For example, if you want to launch Notepad.exe, enter [SystemFolder] in the File Location setting, and enter Notepad.exe in the File Name and Command Line setting.

This setting is displayed if you selected File Exists on Target System for the Source Location setting.

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