[wix-users] Can anyone point me to a working example of how to use EmbeddedChainer to launch a .msi from a .msi?
chrpai at iswix.com
Wed Oct 19 12:05:44 PDT 2022
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?
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?
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.
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users