Recommendation: Launching IA setups from with MSI Code

Got a problem you cannot solve? Try here.
Post Reply
glens
Posts: 2
Joined: Tue Jul 27, 2010 12:53 am

Recommendation: Launching IA setups from with MSI Code

Post by glens »

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.
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Recommendation: Launching IA setups from with MSI Code

Post by alibaba »

I use a launcher application written in delphi for this.
glens
Posts: 2
Joined: Tue Jul 27, 2010 12:53 am

Re: Recommendation: Launching IA setups from with MSI Code

Post by glens »

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.
alibaba
Posts: 314
Joined: Fri Jun 26, 2009 8:46 am
Location: Thuringia, Germany

Re: Recommendation: Launching IA setups from with MSI Code

Post by alibaba »

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.
Post Reply