Summary
Custom action that launches msiexec.Synopsis
If you want your installation to install or uninstall another product before or after your product is actually installed, you should create a custom action that launches msiexec with the appropriate arguments.
Discussion
Create the Custom Action
First, create a property pointing to msiexec using the Property Manager. Name you property, using any name, except one that has already been used. In this example, the name will be "MSIEXEC." In all cases, the value column should have "msiexec," (no quotes for either).
Next, create your custom action using the custom action wizard. Select the Type "Launch an executable" and select "Stored in a Property" for Location.
The Source should be MSIEXEC (substituting your property name) and the target will vary.
The Custom Action's Target
The arguments to msiexec will be specified here.
To install a product, use the /i switch, followed by the path to the msi package. The path should include the msi file itself and must be surrounded by quotes if there are any spaces. If you want to uninstall a product, use /x, followed by the GUID or the path to the msi package. At this time, you may add any other msiexec command line switches necessary to the target.
Listed below are example target fields that may be used in this custom action. See the topic "Command Line Options" in Knowledge Base article Q103227 "INFO: Where Can I Get the Windows Installer SDK?" to find out what else you can do with msiexec.
| Goal | Argument |
|---|---|
| Install other.msi with a stripped down UI | /i "d:\setups\other other.msi" /qb |
| Uninstall a previous version of the product with the product code{10001000-1000-1000-1000-100010001000}. Log the process to c:\tmp\uninst.log | /x {10001000-1000-1000-1000-100010001000} /l*v c:\tmp\uninst.log |
Finish and Insert the Custom Action
You may accept the default values in the wizard for the rest of the options. The In-Script Execution Option should remain "Immediate." It is safe to change the rest of them, but it is advisable to keep "Wait for execution to finish" checked, because the Windows Installer Service will not allow more than one installation to enter the Execute sequence concurrently. It may error out if this occurs.
Finally, either insert your custom action into the UI sequence, or add a DoAction event to a dialog control to trigger your custom action.
Restriction
The type of in-script execution for this custom action must be Immediate Execution, and it must run in the UI sequence, because the Windows Installer Service will not allow more than one installation to enter the Execute sequence.
Related KB Articles
Q103146Q102426
Additional Information
For more information on the approach described, see the InstallShield Help Library topics
? Launching Custom Actions from Dialogs
? Triggering Control Events in Basic MSI Dialogs
Related Articles
Kill 64bit Process During Installation/Uninstallation 8Number of Views There Is Not Enough Space on Drive C to Extract the Files 13Number of Views Installation and Uninstallation Conditions 9Number of Views InstallShield Missing from AdminStudio Installation 5Number of Views Troubleshooting Data Installation And Uninstallation 21Number 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