user48829
user48829

Reputation: 249

WiX generated MSI is not compressed

I use WiX3 to generate MSI installation package. I have specified comression flag on in both the <Package> and <Media> elements:

<Package InstallerVersion="200" Compressed="yes"/>
<Media Id="1" Cabinet="MySetup.cab" EmbedCab="yes" CompressionLevel="high" />

but the resulting MSI is not compressed at all - WinZip compressed it from 2M down to 600K.

Am I missing something?

I am using VS2008 btw.

Upvotes: 7

Views: 3593

Answers (3)

saschabeaumont
saschabeaumont

Reputation: 22426

In regards to the huge bitmaps, I suggest editing them in photoshop to shrink them down. I managed to get two 600K bitmaps down to ~35k each by changing them to an indexed color pallete (Image > Mode > Indexed) and then saving the resulting file as a 8-bit compressed BMP.

Give it a shot ;)

Upvotes: 1

Rob Mensching
Rob Mensching

Reputation: 35976

MSI files are not OLE Structured Storage files. They cannot be compressed and have the Windows Installer still be able to read them. However, many things are stored in the MSI file (such as your UI graphics and CustomAction DLLs and Shortcut Icons) so you should be conscious of the content you are putting into the MSI.

There is nothing in the WiX toolset to analyze each of the things you are putting them in the MSI and compressing them (except the cab file, of course since that is expected by the Windows Installer to be compressed).

Honestly, the Windows Installer does not natively support the best compression of today. One thing to do is to build the package and use a bootstrapper distributes compressed content and uncompresses before passing it to the Windows Installer. That is the plan for WiX v3.5's burn bootstrapper.

Upvotes: 4

wimh
wimh

Reputation: 15232

There is something missing in your question. But how do you know it is not compressed. If Winzip can compress it further, it does not always mean it is not compressed. You can use 7-zip to investigate the resulting msi file. There should be a cab inside, extract it, and look at the size before and after decompressing.

Upvotes: 2

Related Questions