[wix-users] Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?

Christopher Painter chrpai at iswix.com
Thu Oct 20 08:40:38 PDT 2022


No. The parent would have to run Basic/Minimal ( /qb!   no interaction but progress bar )  and the child could run fully silent.     This is because the parent has to have some form of UI for the InstallUISequence to be processed and the custom action is in the InstallUISequence. If the custom action was in the InstallExecuteSequence then the mutex would apply.
________________________________
From: Gary Henry <Gary.Henry at microfocus.com>
Sent: Thursday, October 20, 2022 10:03 AM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>; Christopher Painter <chrpai at iswix.com>
Subject: RE: Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?

Christopher,

You say:

"As for the limitations of the design I mentioned,  it's mostly that you have to have a setup.exe to elevate before going to the parent UI sequence and that you can never run the parent UI fully silent only Minimal.  This is because in fully silent the UI is never executed.  Also the parent pre-elevation is required if you want the child MSI to be able to install silently as MSI has no way to request elevation when running silent.  It can do so when minimal."

For our MSI, we document that the user has to run it from an elevated command prompt as Administrator so I think that elevates the MSI without the need for a setup.exe and give us the ability to run fully silent? If this is true, does this method give us the ability to run both the parent and child MSI silently and remove the limitations you mention?

Thanks!

Gary

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Gary Henry via wix-users
Sent: Wednesday, October 19, 2022 12:11 PM
To: Christopher Painter <chrpai at iswix.com>; wix-users at lists.wixtoolset.org
Cc: Gary Henry <Gary.Henry at microfocus.com>
Subject: Re: [wix-users] Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?

Thanks for the details. I would like to play with the custom action first to see how that works. Any examples?
________________________________
From: Christopher Painter <chrpai at iswix.com>
Sent: Wednesday, October 19, 2022 12:05:44 PM
To: Gary Henry <Gary.Henry at microfocus.com>; wix-users at lists.wixtoolset.org <wix-users at lists.wixtoolset.org>
Subject: Re: Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?

Yes.  While a full on custom bootstrapper takes a bit of work (think of WiX looked like when it was installed)  a basic bootstrapper using the Standard Bootstrapper Application with custom theme.xml can easily do things like have optional features or packages be installed based on the state of checkboxes and such.

FWIW what some people do is split their MSI out into "micro" packages and then install one or more MSIs rather than ADDLOCAL=.  This is especially useful in web based downloaders so your EXE is as small as possible and you can do faster upgrades without having to obsess over the component and patching/upgrading rules.

I do advice that you only give your customers the EXE or the MSI not both.  WiX Burn doesn't do fire and forget and it can get confusing to people when they switch back and forth and Programs and Features isn't looking the way they think it should.


As for the limitations of the design I mentioned,  it's mostly that you have to have a setup.exe to elevate before going to the parent UI sequence and that you can never run the parent UI fully silent only Minimal.  This is because in fully silent the UI is never executed.  Also the parent pre-elevation is required if you want the child MSI to be able to install silently as MSI has no way to request elevation when running silent.  It can do so when minimal.

I actually created a "chainer" using a fake MSI years before burn came out that installed a DVDs worth of stuff.  It's possible but if I was doing it today, I'd use Burn.

________________________________
From: Gary Henry <Gary.Henry at microfocus.com>
Sent: Wednesday, October 19, 2022 1:47 PM
To: Christopher Painter <chrpai at iswix.com>; wix-users at lists.wixtoolset.org <wix-users at lists.wixtoolset.org>
Subject: RE: Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?


Christopher,



Thank you for the quick response! My understanding is that WiX Burn creates a WiX bootstrapper executable file. We have some customers that want to use the UI and some that need the .msi to do a silent install using msiexec with options like INSTALLDIR and ADDLOCAL. Can a silent install using options like these be done with the bootstrapper executable?



I would also like to know more about the limitations of the other possibility you mentioned of launching a parent MSI in full UI mode and using a custom action from the InstallUISequence table to launch another installer out of process. Do you have an example or somewhere that describes how to do this and what the limitations are?



From: Christopher Painter <chrpai at iswix.com>
Sent: Wednesday, October 19, 2022 11:05 AM
To: wix-users at lists.wixtoolset.org
Cc: Gary Henry <Gary.Henry at microfocus.com>
Subject: Re: Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?



That answer is only 99% correct.  There are two mutex



One that prevents two execute sequences machine wide

One that prevents two UI sequences in the same process



It is technically possible to launch a parent MSI in full UI mode and using a custom action from the InstallUISequence table to launch another installer out of process.  However it's use is very limited.



MSI has some chaining functionality introduced later on in its life but they are kinda sketch.  I'd recommend that you look at using WiX Burn to make a bootstrapper that chains your installers together.





________________________________

From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Gary Henry via wix-users <wix-users at lists.wixtoolset.org>
Sent: Wednesday, October 19, 2022 10:44 AM
To: wix-users at lists.wixtoolset.org <wix-users at lists.wixtoolset.org>
Cc: Gary Henry <Gary.Henry at microfocus.com>
Subject: [wix-users] Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?



Hi,

I want to launch a .msi from another .msi but have not found a way to do that. All I could find was a note at https://stackoverflow.com/questions/9194554/custom-wix-action-to-call-depending-msi-on-first-installation that says:

"Windows Installer doesn't allow two installations to run at the same time. Thus this approach will not work. What you need is MSI chaining. You can use the EmbeddedChainer<http://wix.sourceforge.net/manual-wix3/wix_xsd_embeddedchainer.htm> element"

If someone has a working example using EmbeddedChainer they can share that would be appreciated.

Thanks!

Gary

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list