Summary
This article explains how to launch an executable from a subdirectory of SOURCEDIR.Synopsis
This article explains how to launch an executable from a subdirectory of SOURCEDIR. The article applies to Basic MSI Project Type.
Discussion
Launching the executable requires three basic steps:
- Resolve the SOURCEDIR property.
- Set the property containing the full path to the executable.
- Launch the executable.
Use these specific steps to do this in your installation:
- Resolve the SOURCEDIR property.
- In the Sequences view, expand the tree to view the Execute sequence under the Installation sequence.
- Insert the ResolveSource standard action in the sequence somewhere before the location where you'll be calling your custom action and after the CostInitialize action. Set the condition for this action to Not Installed.
- Set the property containing the full path to the executable.
- Navigate to the Property Manager in the Project view.
- Create a new property (for example, ThirdPartyExe).
- In the Actions/Scripts view, right-click on the Custom Actions item and select Custom Action Wizard?
- On the Basic Information panel, give your custom action a name (for example SetThirdPartyExeProperty). Click Next.
- On the Action Type panel, select a Type of "Set a Property." Click Next.
- On the Action Parameters panel, in the Source combo box, select the property you created in step 2.
- While still on the Action Parameters panel, enter [SourceDir]subdir1\subdir2\the.exe. Note: Do not use a backslash (\) between [SourceDir] and the first subdirectory. [SourceDir] already contains the trailing backslash. Click Next and finish the wizard.
- In the Sequences view, insert your custom action (for example the SetThirdPartyExeProperty) into the Installation\Exexute sequence in the appropriate location. Make sure that it is after the ResolveSource action. Set the condition for this action to Not Installed.
- Launch the executable.
- In the Actions/Scripts view, right-click on the Custom Actions item and select Custom Action Wizard?
- On the Basic Information panel, give your custom action a name (for example, RunThirdPartyExe). Click Next.
- On the Action Type panel, select a Type of "Launch an executable" and a Location of "Stored in the Property table." Click Next.
- On the Action Parameters panel, in the Source combo box, select the property you created in step B2 (for example, ThirdPartyExe).
- While still in the Action Parameters panel, enter any command-line parameters (for example, -s for silent) in the Target field. Click Next to finish the wizard.
- Insert your custom action (for example, RunThirdPartyExe) into the sequence in the appropriate location. Make sure that it is after the custom action you created in section B (for example, the SetThirdPartyExe property). Set the condition for this action to Not Installed.
Note that all of the actions were inserted into the sequence with Not Installed as the condition. This is to ensure that the actions are only run when the source is available. This is usually the case only during the initial installation.
If working with a release that generates a setup.exe file, it is recommended to reference SETUPEXEDIR instead of SourceDir because SourceDir will not evaluate to the expected location when working with a single setup.exe release.
An alternate approach is to use the Windows API GetModuleFileName() to find the location of your running exe.
Additional Information
The SETUPEXEDIR property is further documented in the Help Library.
Was this helpful?
Related Articles
Windows Loads a Different Library or Launches a Different Executable than was Intended by the Author of a InstallShield Se… 50Number of Views Launch an Executable from the Support Files Location Using InstallShield 3Number of Views Launch an Executable Using a Custom Action 2Number of Views Launch a Custom Executable 15Number of Views Windows loads a different library or launches a different executable than was intended by the author of an InstallAnywhere… 13Number of Views
Revenera Assistant - Beta
Online
Hi, I am Reva - Ask me anything.
Updates
No new updates
Chat
Home
Updates
/**/
Thanks for the feedback!
Your feedback has been saved.Rate this response:
1
2
3
4
5
Add Additional feedback ( Optional )
0/240
English
English
Language changed successfully
Something went wrong
Email sent successfully
Something went wrong
Case create successfully
Are you sure you want to cancel
the case creation?
Please select a product to submit the case.
Please select a product version to submit the case.
0/255
Upload Attachment
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
Are you sure you want to cancel the case creation?
Case closed successfully
File Upload
Maximum file size allowed is 3 MB.
File type not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
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. | |
File Upload
Maximum file
size allowed is 3 MB.
File type
not supported.
Supported file types:
Documents (.txt, .doc, .docx, .pdf), Images (.jpg, .png), Comma Separated Files
(.csv) Speadsheets (.xlsx, .xls)
© 2026 Flexera Software. All Rights Reserved.
Case id: 00001065
Activity: Status change: 2 hours ago