19

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?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
ZedZip
  • 5,794
  • 15
  • 66
  • 119

2 Answers2

19

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.

Community
  • 1
  • 1
Jason Down
  • 21,731
  • 12
  • 83
  • 117
  • I have created new Bundle project which includes both my msi files. Is this only one way to do it? – ZedZip Jan 04 '12 at 13:34
  • @Oleg: There *may* be other ways to do it (using merge modules if applicable I think), but I've always done it through a bootstrapper. You're not forced to use Burn though. The way I've done it in the past is to create a visual studio project that references the Wix library. Then you can create custom actions (via C# or whatever). The bottom line though, is that you need to launch the installation from the exe so that each msi can run in sequence. – Jason Down Jan 04 '12 at 13:41
  • both of those links are dead now :( – Matt Clarkson Nov 06 '12 at 17:03
  • @MattClarkson I replaced the bootstrapper link (leaving the old one in just in case). The second link appears to be just fine... maybe the site was just down when you clicked on it? – Jason Down Nov 06 '12 at 18:38
  • 1
    @JasonDown Looks like the site was down, thanks for replacing them. I actually found [this](http://neilsleightholm.blogspot.co.uk/2012/05/wix-burn-tipstricks.html) post along with your provided replacement link perfect for learning how to get Burn going. – Matt Clarkson Nov 09 '12 at 13:14
  • @MattClarkson. Good to hear. I added that link up top too. – Jason Down Nov 09 '12 at 20:41
6

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

Community
  • 1
  • 1
Cosmin
  • 21,216
  • 5
  • 45
  • 60
  • you mean I need to use exe instead of msi ? like this – ZedZip Jan 04 '12 at 13:40
  • No. The final package (the one which includes the MSI) is an EXE. I added another link with more details. – Cosmin Jan 04 '12 at 13:57
  • i am stupid ;-),but I dont see how i can add my second MSI to the bootstrapper? I see how to add sql server etc, but how to add my 2nd installer msi package? I mean example "A Sample!".. – ZedZip Jan 04 '12 at 15:59
  • As Cosmins link no longer exists, in case anyone is wondering how to reference more than one MSI in a bootstrapper, there's an example of a chain element with multiple msi's here: http://stackoverflow.com/questions/12917287/wix-burn-determine-what-items-are-already-installed/12975489#12975489 hth... – Fetchez la vache Apr 10 '13 at 08:47