My Wix project creates install.msi and cab1.cab. How can I have it bundle everything into the msi? I will likely use 7-zip SFX to work around this but I have seen other apps with only a single msi.
4 Answers
You didn't post any source but I assume your wxs file has a Media element. Just set the EmbedCab attribute to "yes" in MediaTemplate e.g.
<MediaTemplate EmbedCab="yes" />
3 Comments
wtjones
I had an empty MediaTemplate element but I replaced it with this: <Media Id="1" Cabinet="Cab1.cab" EmbedCab="yes" /> Thanks!
Jeff Yates
Note, you can add
EmbedCab="yes" to the MediaTemplate element to achieve this.Christopher Painter
MediaTemplate wasn't available until WiX 3.6. wtjones didn't mention what version of WiX he was using so I mentioned the way that would work for more people.
With WiX toolset v4 you just need to add the following MediaTemplate element inside your Package element:
<MediaTemplate EmbedCab="yes" />
1 Comment
Erik Midtskogen
I'm doing exactly that, and I'm using Wix v4, but it's still not packaging the cab file into the msi. I can't see why the default behavior would be to leave it hanging outside the installer file. But I guess I can live with it that way if I have to.