Summary
This article discusses how to launch a custom executable from an InstallShield project.
Synopsis
This article discusses how to launch a custom .exe from an InstallShield project and is applicable to Basic MSI and InstallScript MSI Project Types.
Discussion
InstallShield supports calling an .exe from within the Installation, Advertisement, or Administration sequence. Using the Custom Action Wizard, you can include a custom action to launch your executable.
To launch the Custom Action Wizard:
- Open your setup project.
- Click on Custom Actions in the view bar.
- Right-click on Custom Actions and select the Custom Action Wizard.
The Custom Action Wizard presents a series of panels that allow you to specify the custom action's properties.
Basic Information Panel
Here, you name your custom action. You may enter a description for your custom action, however, this field is optional and used only for your own reference. It does not appear during the setup.
Action Type Panel
Select Launch an Executable for Action Type and to choose the Location, consult the following table:
| Location Option | When to Use | Restrictions |
|---|---|---|
| Stored in the Binary table |
Need to hide the executable from the end user; do not want extra files in source image. | May make your MSI package huge if your file is large. Not accessible from application after installation. |
| Installed with the Product |
Want to run something that you are installing. | Can only run after the InstallFiles action in the Execute sequence. |
| Stored in the Property table | Need to run something that you are not installing, but do not want to stream in the MSI package's binary table. | You must make sure the file is where you think it is: target machine, network location, source image, etc., and add a property beforehand whose value is the path to the executable. |
| Stored in the Directory table | Same as Property table. | Same as Property table, except that you would either use an existing Directory table entry or add a new entry with a path to the exe. |
Action Parameters Panel
For the Source field, specify the source executable. The way in which you do this will depend on the Location you specified in the previous panel. The Target should be any command line parameters you want to pass to the .exe.
Additional Options Panel
Here, you can check Wait for the action to finish executing, if you want the installation to wait for the custom action to finish before continuing.
Next, select an In-Script Execution option:
- Select Immediate execution to launch the .exe as the installer processes the .msi package.
- Specify Deferred execution to queue the action and perform it in sequence with all of the other queued actions.
- Pick Rollback execution to indicate the .exe should be launched during a failed installation as the system is being restored to its original state.
- Choose Commit execution if you want the .exe to run after the installation is completed, after the InstallFinalize action.
Finally, select from the options provided for the Execution Scheduling option.
Add It to the Sequence
Select the Sequence in which you would like to execute this custom action and specify a Condition, if necessary.
In the case of custom actions that are Installed with the Product, you will need a condition of Not Installed. This will prevent the installer from trying to run an exe that is already removed during uninstallation.
There are certain restrictions, however. For example, you cannot insert a custom action before the InstallFiles action if the file referred to is installed by the setup.
If your custom action is going to be launched from a dialog, you do not need to add it to a sequence. Just add a DoAction event to one of the controls, and pass the name of your custom action as the argument. Then, the custom action will be launched when that dialog control is activated. Only Immediate execution custom actions can be launched from a dialog.
Related Articles
Expected Behavior of InstallScript Feature Selections 3Number of Views Remove “unknown publisher” on Windows Defender/UAC 8Number of Views Launch an Executable Using a Custom Action 3Number of Views PowerShell cmdlet get-property Used in a Custom Action 6Number of Views Windows Add/Remove Programs lists MongoDB 4.2.13 after Snow License Manager 9.27.1 upgrade 41Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago