PDA

View Full Version : MSI installs another MSI using msiexec.exe



VILEPARLE
07-17-2006, 05:37 PM
I have a parent msi launching a child msi using MSIexec.exe. What happens is when I launch Child, the parent dialog disappears!! What I want to do is to launch child and show no dialogs while Parent to continue showing its dialog!!

Christopher Painter
07-18-2006, 08:01 AM
I should warn you on the dangers of nested installations, but maybe that isn't what you are doing here.

How do you launch the MSI? ( CA type, scheduling, execution ). There are 2 Mutexs in WindowsInstaller. One enforces 1 execute sequence per machine and one enforces 1 ui sequence per process.

While I avoid nested installs like the plague, I do occasionally implement a pattern ( in a very custom bootstrapper written in MSI ) where I have a series of immeadiate execution custom actions at the end of the UI sequence that call CA's that launch new processes of msiexec to install other packages. Each of these are fired LaunchAppAndWait style.

cbragg
07-18-2006, 10:46 AM
In real crude terms, a nested installation will be merged with the main installation. Hence only one set of dialogues, for instance, your parent ones display, close and then your child ones appear. If you want no dialogues to appear in your child installation then just trash them from the MSI. Nasty solution but it should work

michael.s.white
07-19-2006, 12:48 PM
I should warn you on the dangers of nested installations, but maybe that isn't what you are doing here.

How do you launch the MSI? ( CA type, scheduling, execution ). There are 2 Mutexs in WindowsInstaller. One enforces 1 execute sequence per machine and one enforces 1 ui sequence per process.

While I avoid nested installs like the plague, I do occasionally implement a pattern ( in a very custom bootstrapper written in MSI ) where I have a series of immeadiate execution custom actions at the end of the UI sequence that call CA's that launch new processes of msiexec to install other packages. Each of these are fired LaunchAppAndWait style.

When you do this do you forego running the execute phase for the 1st MSI? I have been considering using a similiar method and was just looking to see what others might have experienced. I have two MSI's I would like to install from one UI (might go beyone 2 later).

Christopher Painter
07-19-2006, 12:55 PM
When you do this do you forego running the execute phase for the 1st MSI? I have been considering using a similiar method and was just looking to see what others might have experienced. I have two MSI's I would like to install from one UI (might go beyone 2 later).

Basically my use case is an MSI based bootstrapper. Setup.exe handles things like MSI and .NET Framework ( things that require updates to MSI itself ) and then the MSI uses features\components and the execute sequence to cache the packages to the C:\ for repair. The execute sequence is very stripped down and doesn't actually publish MSI information. The MSI is basically always `Not Installed`.

The PostInstall CA's occur in the UI sequence after the execute action so that the mutex is freed. Silent installations are not supported in a traditional manner but by passing a public properties that drive the behavior.

There is alot more detail to go over.... maybe a beer sometime?

michael.s.white
07-19-2006, 01:19 PM
Basically my use case is an MSI based bootstrapper. Setup.exe handles things like MSI and .NET Framework ( things that require updates to MSI itself ) and then the MSI uses features\components and the execute sequence to cache the packages to the C:\ for repair. The execute sequence is very stripped down and doesn't actually publish MSI information. The MSI is basically always `Not Installed`.

The PostInstall CA's occur in the UI sequence after the execute action so that the mutex is freed. Silent installations are not supported in a traditional manner but by passing a public properties that drive the behavior.

There is alot more detail to go over.... maybe a beer sometime?


Yea let me know if you ever stop through Houston again :) I am going to be diving into this realm in the next few months and it is good to know someone has succeeded already with it.

Where you able to support upgrades with this model?

Christopher Painter
07-19-2006, 01:25 PM
In my bootstrapper I have a couple dozen product configurations for supporting different applications. I use a system of merge modules to provide points of variation on SystemSearchs per release. Then I use FeatureConditions to hide packages that are already installed.

During an upgrade scenario the newer package fails the condition so the feature is once again shown for installation. Then the post install simply executes the package again to perform the upgrade.

After the upgrade the package triggers the condition and it's filtered from the list. Once all packages are filtered the installer displays a message that the product is already installed and to make changes through add/remove programs.

One day I might try to make a fake MaintenanceUI but I havn't yet.