Sometimes it is necessary to run and complete one MSI installation before the next MSI installation starts. This may happens if your software is dependent of some specific prerequisites, also during the installation. One common problem is that one component can not be installed and registered in the system, in a proper way, before some basic components that it needs are installed first. The installation of these basic components must be completed first, otherwise the next installation may fail.
It is possible to create setup packages where one installation is completed before the next one starts, but this can normally be tricky to achieve. But with the new script command MSIEXEC that we have added to Visual Installer, this is very easy done.
The MSIEXEC command is used to install MSI packages and MSIEXEC has a parameter with the name %Wait that is useful when multiple MSI setup packages need to be installed, and they must be installed in a specific order. If you set this parameter to WAIT Visual Installer will pause its own setup process until the installation of the MSI package is completed. Thereafter the installation (for example processing of more script lines) will continue.
Below we will show you an example of how to use the MSIEXEC command.
In this example Visual Installer will first install MSI file #1 (MySetup1.msi), waits until the installation of the MSI file is completed, and then install MSI file #2 (MySetup2.msi), and wait until this installation is completed, and then continue the rest of the installation.
(The script command MESSAGE can be used to inform the user what happens during the setup process. If the MSI installations are time consuming it can be a good idea to inform the user that another installation is running for the moment.)
More information about MSIEXEC
For more details about the new MSIEXEC script command, and for more examples of usage, see this tips & tricks page:
> Tip: Run MSI installation from script