Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.

like image 686
user48829 Avatar asked Dec 24 '08 06:12

user48829


2 Answers

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.

like image 174
Rob Mensching Avatar answered Oct 23 '22 17:10

Rob Mensching


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.

like image 40
wimh Avatar answered Oct 23 '22 17:10

wimh