How can I reduce the size of a 1GB MSI file using Orca?
Asked Answered
L

2

1

I have written a C# WPF application. I have now created an MSI that will install the application. However, the file size is gigantic. The application contains many video and image files, which have combined to make the MSI a whopping 1GB in size.

I have tried to reduce the file size with Orca. I have used "Save As" to create a brand new MSI and have also exported the database tables and then imported them to another MSI. In both cases, the file size is reduced to less than 1MB, but then the installer doesn't work at all. Looks like it's not compressing the content, but rather removing it entirely.

How can I use Orca to reduce the MSI file size without stopping the installation from actually working? If there's another way to do it, I'm open to any suggestions.

Lacour answered 30/5, 2019 at 14:42 Comment(4)
Well, if your MSI contains files it can only be reduced by getting rid of these files. Videos and pictures are usually already compressed so MSI compression will not reduce their size. You could only extract cabinet archive(s) from the MSI file and put it near.Scarberry
What makes you think Orca can help you dealing with image and video sizes? At least that's how i understand your question... Try to make the size of your images and videos smaller... use stronger compression for them (which could perhaps also mean different image/video file formats/codecs)Thorner
@elgonzo Orca is the only MSI editing tool I am familiar with and I've heard that it CAN be used to reduce MSI sizes, but I haven't been able to find much information explaining this further. But like I said in the question, I'm open to suggestions if there's another way to do it. Orca's not the only thing I'm willing to use.Lacour
I know it sounds silly but would it help to have the msi file smaller and an additional .cab file with the load in it? I don't really understand what you are trying to accomplish.. you deliver big files.. you get a big installer.Jacquard
S
0

Online: Can you put some videos online? Youtube? Easier to manage and update over time as well. And easier access for people who do not have your product downloaded? Better for marketing? It depends if the content is help material or the actual product you are trying to sell. You can install low-res versions of the videos and images as a fallback mechanism if Internet is not available? Maybe see this older answer?

Compression: You are using WiX? No? On selecting an MSI tool. If you are using WiX, then you can try to use the highest compression level for the MSI? (MSI compression levels). This means you have to rebuild it with the new setting. There are alternative elements to do so:

WiX: In WiX it is easy to set the compression level:

<MediaTemplate EmbedCab="yes" CompressionLevel="high" />

A little crash course in minimal WiX markup to compile an MSI can be found here: Transparent aluminum! The markup towards the bottom with inline comments is usually enough for people to get going. See other resources here: installdude.com (my own experimental site - expand help section in left navigation pane). Also check "WiX Samples" in quick search section towards top.

I forgot the WiX quick-start tips answer.


Links:

Shrub answered 30/5, 2019 at 15:13 Comment(3)
I would highly recommend against using EmbedCab='yes', especially in this case. The cabinet in the MSI will get cached with the MSI (for uninstall purposes) and take up space on the user's system drive. Embedded cabs for a large application like this is especially painful for users.Input
That can be dealt with by using administrative images? Essentially a glorified file-extraction from the MSI making a network installation image. And here is a piece on the huge, cached files and administrative images as well as various space saving methods.Hamitic
Technically speaking it is possible for the user to create an admin image of the MSI on their computer, and installing the MSI from that image. But that will require a pretty technical user. Essentially it pushes the problem on to the user, which seems wrong to me.Input
I
0

First, build your installation package with the cabs external (not embedded) in your MSI. That will show you how large the MSI is in relation to the rest of your installation. Chances are you'll find the MSI size is insignificant compared to the content in the cabinet files. My guess is that the video and images are not compressing well in the cabinets.

If my hypothesis is correct, then your goal is to find the optimal compression for the files in the cabinets.

Note: If you use the WiX Toolset to build your MSI, we already do the tricks to ensure the MSI portion is as small as possible. You are not likely to find significant optimizations on top (and if you do, let us know at [email protected], we'd love to improve :).

Input answered 30/5, 2019 at 15:48 Comment(4)
I haven't checked what the default compression level of WiX projects are? Is it "high" outright? I'll do a quick test myself I think - unless you know off the top of your head?Hamitic
IIRC, it is mszip which was a reasonable balance back in the day. But that's based on memory. There have been optimizations made since then so I could be completely wrong now... especially for MediaTemplate (which is quite new).Input
If anyone is wrong about MSI.. even this many years later.. it's probably not you @RobMensching :)Jacquard
Quick testing showed that <MediaTemplate EmbedCab="yes" CompressionLevel="high" /> compressed more than when there was nothing defined for CompressionLevel. In other words I guess high enables LZX compression. Unsure of side-effects?Hamitic

© 2022 - 2024 — McMap. All rights reserved.