Discussion Locked

Why is my VB app so big?

0 helpful
9 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I have written a visual basic application. The executable is 512k and it has a 420k database packaged with it. It is not a big application, but after running the package and deployment wizard, the cab file is over 12MB. Why is it so big? Is there something the P&D Wizard is packaging with it that makes it so big and can some of that stuff be left out? I want to deploy it on the web, but that is too big for such a simple program.

9 replies

by result

You may want to check what other external dependencies (ActiveX components, etc) your program is using. The P&D Wizard will include all referenced dependencies automatically. Some dependencies you can't really get away with, like the VB run-time, unless you know your target audience has it. The run-time weighs in at around 1.3MB.

You may also want to look into doing an Install-from-the-web type installation, so only those files that the user doesn't have will be downloaded.

by ggardner

I unchecked the mdac_typ.exe, which installs all the database access stuff, so it wasn't included and the size dropped to a little over 4MB. That helps, but can I get away with that? How do I do a web installation?

by gbworld

There are a couple of possibilities here:

1. You have a lot of references or components added to the project. If you are not using references or components, the best bet is to remove them. There are other ways to kill this tendancy, but I look for the easiest answer.

2. You are including the VB runtime. There are a couple of ways around this.

a) Make two versions of the package. One with the runtime, one without. The without will still run if the user has the proper libraries.

b) Make web packages that download common components from Microsoft.

I would look at the .cab files created by the package wizard and see if there are components included that are either Microsoft core components or unnecessary. This is the best methodto determine a course of action.

Gregory A. Beamer

by ggardner

I unchecked the mdac_typ.exe, which installs all the database access stuff, so it wasn't included and the size dropped to a little over 4MB. That helps, but can I get away with that? I already went through all references and components and got rid of the ones I don't use. How do I do 2b that you mentioned?

by donq

AaHhhh - you said the magic word "database".
The 420K database file tells your program which Access 2000 or VB? database engine DLL's to run when executing your code.

What is happening (depending on the version of VB you used) the executable is adding database engine DLL's from your hard drive so your completed executable will be portable. This is a good thing is everyone using your executable doesn't have these files on thheir PC and it is VERY NECESSARY!

Actually I thought 12MB was quite small...Many "executable Access builds" run 18-25MB. They may however transport both the VB and Access database (Jet) engines?

by peyison

Unless you know that the person you're delivering your app to has the same version of MDAC installed that you compiled with, I would not recommend taking mdac_typ.exe out of your setup. Also, if your users are running on Win9x, you'll probably need to distribute DCOM98.exe. They will need to install that separatly. If your app uses DAO, there will be additional files for that since it is not included in mdac_typ.exe.

You can look in the "support" sub-folder off of the folder you created the setup package in to see all of the files being included in the setup package.

This discussion is closed to new replies.