dbdesc blog

database documentation

How to Reduce the Size of Your MSI Installer

I use WiX to build the installer packages for dbdesc and dtsdoc. Today, I’ve reduced the size of both installers by 20%. How?

It turns out that the WiX tutorial states it clearly:

We also have to include the icon we want to use in the shortcuts. Note that the Id identifier has to carry the same extension as the target file, in this case, .exe: <icon Id=”Foobar10.exe” SourceFile=”FoobarAppl10.exe” /> This will store the source file separately in the final installation package (so, if you refer to your main executable, you will end up with two copies). If the size of the file is large enough to cause concern, create a small .exe or .ico containing nothing but the icons.

(Emphasis mine)

Of course, I was extracting the icon directly from my executable. That is 550 KB for dbdesc and 280 KB for dtsdoc. In fact, it was much worse, because I had an additional reference to the executable for a second icon. The net result is that I was adding one additional megabyte to the dbdesc installer and about 500 KB to dtsdoc.

So, remember to reference directly an icon instead of your executable and you will save bandwidth and download time.

Comments