How to reduce setup file size


I have an application developed C# 2.0.
It uses MS Office dll's for Office interop(Outlook and Excel).
When i created Setup project using VS 2005, file is about 15 MB. (Even if did zip also, almost same)
After installing it in a system, total application folder is taking around 30 MB.
These are the files and their memory in the application folder.
EXCEL.EXE  -  9.6 MB
Interop.Excel.dll  - 1 MB
MSO.DLL - 11.6 MB.

Remainig all are application files.
Is these files are required, to work with MS Office?
Or did made any mistake while adding references?

Since this application is downlodable from internet, i want to reduce the file size as much as possible.

Thank you.

LVL 12
Praveen KumarArchitectAsked:
Who is Participating?
StanicDejanConnect With a Mentor Commented:
You don't need (or are even allowed to) to distribute excel.exe and mso.dll.

mohsynConnect With a Mentor Commented:

In setup script just put a check to find if these files are available on system or else display an error asking to install them first. this will ensure it will install on systems having this files.
these are not freely distributable files and can land you in trouble if you do that.
once you remove those bulky excel.exe and mso.dll your setup size will probably come down to 1mb
Praveen KumarArchitectAuthor Commented:
Ok, i excluded those files from from "Detected Dependences" from Setup project.

If i build again, setup file size is same( 15 MB).

Is there any tools to reduce this size?
Never miss a deadline with

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Setup project already compresses files, so it isn't possible to (substantially) further reduce the size.
Are you sure you deleted all the unnecessary files?


what are the files getting compressed by setup

use some filemonitoring tool to find out and see what can be detached

all common files like msv*.dll  *ct*.dll are usually available on all machines and need not be copied

if you can paste a list of your references used or dependencies here maybe i can help

Praveen KumarArchitectAuthor Commented:
Got it work, I am using some third party controls. I used in this application before and deleted after. I removed all the references to that controls also.
Now its fine, file size is 3.4 MB.

Thanks for you both.
All Courses

From novice to tech pro — start learning today.