Launching Executable Files
InstallShield 2020
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 from your installation is useful to install third-party tools, display a readme file, or display a Web page that contains the most up-to-date information about the product being installed. To launch an executable file from within your installation, you need to add a custom action in the Custom Actions and Sequences view (in Basic MSI, InstallScript MSI, MSI Database, and Transform projects) or the Custom Actions view (in DIM, Merge Module, and MSM Database projects).
You can use the Custom Action Wizard to create the custom action that launches an executable file from your installation. Each wizard panel is listed below, with the entries that you need to make in order to launch an executable file.
Basic Information Panel
Panel Option |
Value |
Name |
Provide a meaningful name for your custom action. This name is used internally in your product and is for identification purposes only. |
Comment |
Type comments about this custom action. |
Action Type
Panel Option |
Value |
Type |
Select the type of custom action that you want to create. For this example, select Launch an executable. |
Location |
The selection that you make depends on where the target executable file will be during the installation. Because Notepad is on everyone’s machine, it is the target for this custom action. Because Notepad is practically guaranteed to be present in the target machine’s Windows folder, you can point to it using the Directory table. Therefore, select Stored in the Directory table. |
Action Parameters
Panel Option |
Value |
Source |
Since you choose to launch an executable file stored in the Directory table, you are given a list of choices that reflect all of your current entries in the Directory table. One of these options is WindowsFolder. Choose this option to point to Notepad without having to hard-code a path. |
Target |
For this option, you need to enter the target file within the specified directory from the Source option. Enter Notepad.exe and click the Next button to continue. |
Additional Options
Panel Option |
Value |
Return Processing |
Specify how Windows Installer should control the processing of the custom action thread. You can have the main and custom action threads run synchronously (the installation waits for the custom action thread to complete before resuming the main installation thread) or asynchronously (the installation runs the custom action simultaneously as the main installation continues). In this example, select the Synchronous (Check exit code) option. |
Respond Options
Panel Option |
Value |
In-Script Execution |
Select Immediate execution to have your action executed as soon as it is encountered in the script. |
Execution Scheduling |
Select Always execute so that your custom action launches every time that it is encountered. |
Inserting Custom Actions into Sequences
After you have created a custom action, you must insert it into a sequence in the Custom Actions and Sequences view.
See Also
Launching an Installation from Another InstallScript Installation