logo

Launching Child Installer from main MSI

TT posted on Friday, February 29, 2008 12:01 PM

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
reply


That 1722 error is normal in those cases.

Phil Wilson posted on Friday, February 29, 2008 3:19 PM

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]
reply


Didn't Find The Answer You Were Looking For?

View Windows MSI Posts   Ask A New Question

EggHeadCafe has experts online right now that may know the answer to your question.  We pay them a bonus for answering as many questions as they can.  So, why not help them and yourself by becoming a member (free) and ask them your question right now?
Ask Question In Live Forum

If you have an OpenID and do not want to become a member of the EggHeadCafe forum, you can also sign on to Chat Chaos and post your question to our real time Silverlight chat application.
Ask Question In Chat Chaos

Previous Windows MSI conversation.

ADSI    Data Protection Manager    Deployment Desktop    Development Device Drivers    Devlopment Device Drives DTM    Dynamics Developer    Help Authoring    HI Server    InfoPath    MAC Other Products    MAC    MOM    MS Hardware    Point of Sale    Services for UNIX    Simulators    Smart Phone    Software Update Services    Solomon    SV Windows    Windows Debugging    Windows Devices PNX    Windows MSI    Windows Tablet PC   






  $1000 Contest    [)ia6l0 iii - $228  |  Jonathan VH - $161  |  Huggy Bear - $135  |  F Cali - $95  |  egg egg - $94  |  more Advertise  |  Privacy  |   (c) 2010