Summary
How to launch a child MSI install from an InstallScript installationSynopsis
There are many cases where you have to launch a third-party installation from within your installation. This article explains how to launch a child MSI install from an InstallScript installation.
Discussion
One of the scenarios is to launch a vendor MSI installation from an InstallScript install. This article assumes that the installation supplied by the vendor is in uncompressed format, meaning you can see the MSI file on the media supplied by the vendor. Check the media supplied by the vendor to determine whether the Windows Installer engine redistributables (InstmsiA.exe - WIndows 9x and InstmsiW.exe - Windows NT, 2000, XP and 2003) are present. If the Windows Installer engine redistributables are not present, download them from Microsoft?s web site
For the sake of simplicity, we will also assume that the child MSI install and the Windows Installer redistributable files are added to the SUPPORTDIR (Support files view\Setup files tab) folder of your InstallScript setup.
Determine whether the Windows Installer engine is present on end-user?s machine
The first thing you have to do before launching the child MSI setup is to check for the presence of the Windows Installer engine on the machine. You can check for the Windows Installer engine using the following code:
#define FILE_SPEC "msiexec.exe"#define TITLE_TEXT "FindFile Example"
STRING svResult;STRING svVersionNumber;
function FindMSIEngine()
begin if (FindFile (WINSYSDIR,FILE_SPEC, svResult) < 0) then MessageBox ("FindFile failed.", SEVERE); else VerGetFileVersion(WINSYSDIR^FILE_SPEC,svVersionNumber); SprintfBox (INFORMATION, TITLE_TEXT, "Found: %s in %s.", svResult, WINSYSDIR); endif;end;
Windows Installer engine is present
If the Windows Installer engine is present on the machine, launch the child MSI install using the following code:
STRING szProgram = WINSYSDIR^"msiexec.exe";STRING svPath = SUPPORTDIR^"Basic MSI.msi";STRING szParam; LongPathToQuote(svPath,TRUE);szParam= "/i " + svPath;LaunchAppAndWait(szProgram,szParam,WAIT);
Windows Installer engine is not present
If the Windows Installer engine is not present on the machine, launch the appropriate MSI engine redistributable file using the LaunchAppAndWait function, based on the end-user?s operating system, from SUPPORTDIR. If you are installing MSI engine 1.1, then you have to reboot the machine after the installation of the engine is done. The MSI engine 2.0 allows you to suppress the reboot.
Once the MSI engine is installed then you can launch the child install using the method described under ?Windows Installer engine is present? section.
Note: InstallShield 11.x, 10.x, DevStudio and Professional 7 users can include the MSI 2.0 engine InstallShield object to handle the installation of the Windows Installer engines.
Additional Information
For further information on command-line parameters for msiexec.exe, see the Windows Installer Help Library topic Command Line Options.
Related KB Articles
Q292539: How to obtain the Windows Installer Engine.Related Articles
Using the Microsoft WMI Diagnosis Utility 5Number of Views InstallAnywhere Redistributable Files 3Number of Views Flexera SaaS Management Data Ingestion Utility 21Number of Views InstallAnywhere Files and Utilities 11Number of Views Extracting files during Pre-Install with InstallAnywhere 6Number 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