Problem in setup creation ( VB 6 )
I have created a project in Vb 6, I wanted to create a setup out of it, I have tried in Vb, it creates setup successfully but I creates .cab file wit it, This .cab files contains all files which exists in the setup. Is there any solution by which I can reduce size of this .cab files ?
Regards,
Jitendra
Re: Problem in setup creation ( VB 6 )
Thread moved to Application Deployment forum, which is for questions about installing/distributing your software
Re: Problem in setup creation ( VB 6 )
CAB files are usually produced using compression. While this is not the most advanced compression, even an alternative would probably not reduce the size more than 10% or so.
A few things you can try are:
- Make sure you are not including dependencies you do not need to deploy. Many people erroneously try to deploy DLLs that are part of the OS, bloat your CAB file, and may well fail to deploy or even cause problems on target systems.
- If a substantial part of the CAB file is your own VB EXEs, OCXs, DLLs you can try compiling to p-code instead of native code. This is always somewhat smaller, sometimes much smaller. Often the performance penalty is negligible or unimportant.
If you are specifically targeting supported systems (Win2K SP4 or later) you may be able to skip deploying the VB6 runtime components. However in the case of anything but XP SP3 or later (which include the latest runtimes) you will want to test your program against the old runtimes that might be in Win2K or XP prior to XP SP3.
Usually this means testing with the VB6 SP4 and SP5 runtimes.
For unsupported systems (Win2K < SP4, NT 4.0, Win9x) you have little choice but to deploy the VB6 runtimes.
MDAC is another example of a large subpackage you might leave out.
If you use MDAC components like ADODB, you can target the current "baseline" release of ADO 2.6 in your program. If a target machine has 2.7, 2.8, or 6.0 installed the new ADO code is automatically used though some new features (seldom needed) will not be available to your program. All currently supported versions of Windows have MDAC 2.6 or later.
However... once again if your program must run on old OSs (older than Win2K SP4) you'll need to deploy an appropriate MDAC package, so you can't cut back on that.
Microsoft Data Access Components (MDAC) Installation
There are some strategies involving more sophisticated compression but they usually save little and can be clumsy to build. The PDW cannot use them unassisted anyway, and you will have a lot of fiddling to do as well as needing additional software.
Re: Problem in setup creation ( VB 6 )
@ dilettante
Couldn't the user update the files included in the set up package version wise? If so couldn't the original poster just put a note in the readme file for the program telling the user to download the latest version of said files. This would reduce the size of the CAB files since you wouldn't have to include the old version of ah file in the setup.
Re: Problem in setup creation ( VB 6 )
You're right. If there are separate large items that a program requires it isn't that rare to state "requires xxx version yyy or later" and provide links or instructions for downloading them.
This can even be done for the VB6 runtime, though Microsoft discourages it somewhat.
VBRun60sp6.exe installs Visual Basic 6.0 SP6 run-time files
Quote:
The VBRun60sp6.exe file is not intended to replace the Package and Deployment Wizard (PDW) for distributing Visual Basic applications. For example, if your application includes components such as ActiveX controls or DLLs, use the PDW or a third-party setup package for distribution. However, if your Visual Basic application depends on only the files that are included in the VBRun60sp6.exe file, you can distribute your application by providing the executable (.exe) file and VBRun60sp6.exe to end users.
In addition to distributing simple executables, you can also use the VBRun60sp6.exe file for the following:
To minimize the size of Internet downloads of Visual Basic applications.
By running the Vbrun60sp6.exe file ahead of time, users can download your application from the Web faster.