Sequencing a Custom Action that Launches an .exe File

InstallShield 2015

Project: This information applies to the following project types:

Basic MSI
DIM
InstallScript MSI
Merge Module
MSI Database
MSM Database
Transform

Launching an executable file as your custom action can be a little trickier than calling a DLL file function in terms of where that action can be inserted into the sequence. You should consider things such as when the .exe file will be launched during the installation and which sequences you want the custom action to occur in.

Executable Files Stored in the .msi Package

When you are launching a .exe file that is stored in the .msi package, you can place the custom action anywhere in the sequence.

Settings for Actions that Launch an .exe File in the .msi Package

Action Type

Location

Scheduling

Sequence

Launch an executable

Stored in .msi package

Not applicable

Anywhere in the sequence

Installed Executable Files

If your .exe file is going to be installed as part of the installation, you should follow one of two sets of rules, depending on which scheduling property (Deferred Execution or Immediate Execution) you chose. For Immediate Execution, you must insert your action after the InstallFinalize action in order for it to work properly. For Deferred Execution, you need to insert the action after the InstallFiles action and before the InstallFinalize action.

Settings for Actions that Launch an Installed .exe File

Action Type

Location

Scheduling

Sequence

Launch an executable

Installed

Immediate Execution

After InstallFinalize

Launch an executable

Installed

Deferred Execution

After InstallFiles and before InstallFinalize

Local Executable Files

If the .exe file that you would like to run is already present on the system, you will need to insert your action after the CostFinalize action is called. See the table below for a clearer view.

Settings for Actions that Launch an .exe File that Is Already Installed

Action Type

Location

Scheduling

Sequence

Launch an executable

Local

Not applicable

After CostFinalize