Hi,
I need to call a number of setups (both IA setups and other setups) from my MSI code. I have had limited success and have tried many techniques.
The most successful so far has been to use File Bags containing MSIs that have been created using the Group Policy wizard. These MSI's were originally "Single File" IA setup exes prior to be converted by the Group Policy Wizard.
I then executed these MSIs using (Un)Install MSI setup. This were successful in that most error messages were reported back to the calling MSI code.
However, I found that the calling code was not waiting for these finish, resulting in multiple setups running at the same time. This is very slow, and also some of the other non-IA setups I was trying to run were failing with a "Another installation is in progress" message.
In short, is there a recommended way to launch and run an IA-created setup from within another IA setup so that (hopefully):
* It runs silently (i.e. all defaults are used and no user interaction is required)
* Error messages are reported back to the calling MSI code
* It waits until each setup has finished before launching the next one?
Thanks.
Recommendation: Launching IA setups from with MSI Code
Re: Recommendation: Launching IA setups from with MSI Code
I use a launcher application written in delphi for this.
Re: Recommendation: Launching IA setups from with MSI Code
I think I have found a reasonable compromise. Here is what I do:
* For any IA setups that are to be included inside another IA setup, I build them with NOEXE=TRUE option, Uncompressed.
miabuild.exe "SubSetup.mpr" /r /b=0 NOEXE=TRUE
* In the main Setup, I define a File Bag to hold all the files created by the above.
* I then use Run Light Mode on the setup exe inside this File Bag.
Run Light Mode Installaware Setup $MYBAG$SubSetup.exe
The main setup then calls the sub setups one at a time and reports failures. The only thing we don't get back is an error message if it fails - only an error code.
Can anyone suggest any improvements to the above? Is it possible to get an error message back (like you get if you use (Un)Install MSI setup)?
Thanks.
* For any IA setups that are to be included inside another IA setup, I build them with NOEXE=TRUE option, Uncompressed.
miabuild.exe "SubSetup.mpr" /r /b=0 NOEXE=TRUE
* In the main Setup, I define a File Bag to hold all the files created by the above.
* I then use Run Light Mode on the setup exe inside this File Bag.
Run Light Mode Installaware Setup $MYBAG$SubSetup.exe
The main setup then calls the sub setups one at a time and reports failures. The only thing we don't get back is an error message if it fails - only an error code.
Can anyone suggest any improvements to the above? Is it possible to get an error message back (like you get if you use (Un)Install MSI setup)?
Thanks.
Re: Recommendation: Launching IA setups from with MSI Code
Maybe you would like to specify custom return values in your sub setup using the Terminate with Exit Code command. Or display message box in case of failures.

