Visual Basic Concepts
A standard package is a package that is designed to be installed by a setup.exe program, rather than through the downloading of a .cab file from a Web site. You create standard packages for Windows-based applications that will be distributed through disks, CD, or a network share.
When you create a standard package, you must carefully consider the distribution method you plan to use prior to creating your package. If you plan to use floppies, you must usually create multiple .cab files that can be placed onto several disks, rather than one large .cab file. An option in the Package and Deployment Wizard lets you specify whether you want one or multiple .cab files and the .cab size to use (1.44 MB, 1.2 MB, etc.). If you select multiple .cab files, the wizard splits your application files into several sets that do not exceed the indicated size.
Important Even if the application you plan to distribute on floppy disks is small enough to fit on a single disk when packaged into one large .cab file, you should still choose the multiple .cab option so that you have access to the floppy disk deployment process later in the wizard. In this case, only one .cab file will be created.
If you're planning to deploy to a network or local share, to CDs, or to a Web site, you can create either one large .cab file or multiple smaller .cab files.
Parts of a Standard Package
There are several files that are always part of your standard packages. These include:
- The setup.exe file. Setup.exe acts as a pre-installation executable. Setup.exe is the first thing run on the user's machine in the installation process, and it performs necessary processing that must occur before the main installation takes place.
- The setup1.exe file. Setup1.exe acts as the main setup program for your application.
- All required support files. Support files are stored in the \Support subdirectory, beneath the directory in which the package was created. In addition to the setup.exe and setup1.exe files, this directory contains the files necessary to customize the .cab files for the application if the users so desire.
- The .cab files for your application. Both Internet and Windows-based applications are packaged into .cab files prior to distribution. A .cab file takes the place of what was, in previous versions of Visual Basic, a long list of compressed application files. All of those files are now contained within the .cab. You can have a single .cab for your application, or you can create multiple .cabs for floppy disk delivery.
Note If your application will be run on a bidirectional (BiDi) operating system, you will need to manually include the vbame.dll file in the Setup.lst created by the Package and Deployment Wizard. You can do this by adding the file at the Included Files screen when running the Package and Deployment Wizard, by editing the Setup.lst directly, or by adding an entry for vbame.dll to the vb6dep.ini file so that it will be automatically added to the Setup.lst whenever you run the Package and Deployment Wizard.
Data Access Features
If your application uses one of Visual Basic's data access technologies, such as Data Access Objects (DAO), ActiveX Data Objects (ADO), or Remote Data Objects (RDO), the Package and Deployment Wizard performs two additional steps during the packaging process:
- If your application uses ADO, OLEDB, or ODBC components, the wizard automatically adds a file called mdac_typ.exe to the list of files to include in your package. Mdac_typ.exe is a self-extracting executable that installs all of the necessary components you need for your data access technology.
- The wizard prompts you to choose the appropriate data access option when your application includes DAO features. You choose the appropriate method — ISAM-based, ODBCDirect, ODBC through Jet, etc.
If you application uses certain files related to data access, the wizard automatically sets these files to be downloaded from alternate Web locations rather than included in your package. You should not change these settings to include these files in the .cab. The table below lists the files and their default download locations:
|File||Default Download Location|
Remote Automation and DCOM Features
If your application utilizes remote code components (formerly called OLE servers), you need to create two packages for the application: a setup program for the client, and one for the server. You can use the Package and Deployment Wizard to package the application, simply by running it twice on the same project group — once on the client project, and once on the server project.
Before you package either the client or the server, you must make sure that you have created the necessary remote support (.vbr) files for the project and placed them in the same directory where the .vbp file for the project is located.
To create support for Remote Automation or DCOM
- Open the project group in Visual Basic and select the project that will act as the server.
- Select Project Properties from the Project menu. Select the Components tab of the Project Properties dialog box and check the Remote Server Files option.
When you compile the project with this option selected, the .vbr file is created automatically.
Registry and License Files
If your project references any .reg or .vbl files, you will see an additional screen in the wizard where you can specify how this registry information should be treated. You can choose to simply copy the registry files to the end user's computer, or you can have the system store the information in the registry and automatically register it on the end user's computer.
Note When you create a package for an ActiveX control that requires a license key, the license file (.vbl) is not automatically included in your package. You must add the file manually on the wizard's Included Files screen.
Missing or Outdated Files
As you move through the wizard, a series of dialogs may appear if any files needed by your application are missing or if any files have missing or outdated dependency information. You can either choose to proceed without the dependency information for the component, locate the missing files, or permanently mark a file as requiring no dependencies.