How to add an MSI file to my installer

2019-02-12 01:25发布

问题:

I have WiX 3.6 (Oct 2011) installer for my application. My application requires another service to be installed in the system. I added an MSI file to my installer this way:

<Fragment>
    <PackageGroup Id="MyService" >
        <MsiPackage Id="MyService" Name="MyService" SourceFile="MyService.msi" DisplayInternalUI="yes" EnableFeatureSelection="yes">
        </MsiPackage>
    </PackageGroup>
</Fragment>
<Fragment>
    <ComponentGroup Id="APPFILES">
    ...
</Fragment>

The installer works fine, but this additional MSI file is not installing. What am I missing?

回答1:

You cannot install one MSI from another MSI. What you need to do is create a bootstrapper (link appears dead now, possible suitable replacement link) that installs each MSI in sequence. Wix 3.6 has a built-in bootstrapper called Burn.

Here is another helpful link, courtesy of Matt Clarkson.



回答2:

Make sure you are using Burn: http://robmensching.com/blog/posts/2009/7/14/Lets-talk-about-Burn

An MSI cannot include another MSI, so you should also get an EXE file. Make sure you launch the installation through that EXE