 |
Launching Child Installer from main MSI - TT |
29-Feb-08 12:01:31
|
Hi
One of my clients need an MSI package to deolpy an application in to the
workstations. This is what he wants me to do:
1. Create an 'Example App.msi' and include all the Child setup files in it.
2. On deployment the 'Example App.msi' should install the Child app's
setup files to an Installdirectory and launch the 'setup.exe' with silent
switch .
3. On uninstallation launch the 'setup.exe' with silent uninstall switch &
then remove all files.
I created an MSI using Wisepackage studio, added the setup files and now
stuck at creating a custom action to lauch the setup.exe.
I'm currently using the 'Execute Program from Installed Files' option with
sequence just above 'InstallFinalize' . Other options - a) Defferred
Execution - User Context b) Synchronous Processing
In this sceneario on instllation my msi launches the
setup.exe and it throws a message that 'Windows Installer Service already in
use'. On clicking close my MSI will roll back with an 'Error 1722'.
Now if I use processing as 'Synchronous, Ignore Exit Code' the setup.exe
will fail like in the first case but my installer is not haivng any 1722
errors.
I have seen msi's launching other installers when they finish the install.
ie. We can 'Finish' the parent 'MSI' while the Child MSI is running. How can
I do a custom action like that?
Any poiners in this regard is welcome.
Thank you
John |
 |
| |
| |
|
| |
|
Launching Child Installer from main MSI - Phil Wilson |
29-Feb-08 03:19:18
|
That 1722 error is normal in those cases. You're saying ignore error code in
that other case, but that custom action is still going to fail! All you're
saying is to ignore the error and carry on. Internally the MSI will fail
with 1618 (another installation in progress) and that will get you back into
a custom action program failed error 1722.
The way that these problems are often solved is to run a chainer that
installs each setup one after the other. That's why (for example) the NET
framework is installed by a bootstrapper before running a product MSI - the
NET FW install is MSI based and can't be run from the main MSI.
You could try having a custom action on the Finish button that launches your
own async executable, and that executable
waits until the _MsiExecute mutex is available, then launches the other MSI,
but then you end up doing that with each MSI, and that is worse that one
chaining program that just launches them all one after the other. However
your uninstall is still going to be an issue for the same reason - .you
can't run an MSI uninstall as a custom action from an MSI uninstall. Your
client's approach basically isn't going to work.
--
Phil Wilson
[MVP Windows Installer] |
 |
| |
|
|
| How to exclude component from self-repair? |