Visual Basic Deployment Wizard

Visual Basic supplies you with a wizard for almost every task. In this case, it will take your final version of working code and package it so that it can be deployed to the end users. This is useful for every member of the team to know - even if you are not too technically minded, you will still be able to make sure that the application is available to be handed over to the end user.

Open the package and Deployment Wizard from the Visual Basic folder (or the Visual Studio 6.0 Tools folder if you have Visual Studio) from the Programs menu. The Package and Deployment Wizard will open and prompt you to select the project you want to deploy. Locate the project file on your computer that you wish to deploy.

This first screen shows us options for creating, deploying and maintaining application setup files. For now, the only option we are interested in is the Package function, which allows us to create a setup facility, so click on the Package button.

This stage allows us to specify the type of package we wish to create: as you can see, we can say that we want a standard executable package, an Internet package or we can specify it as a dependency file. A dependency file is a file that our application, or components within our application, requires in order to run. It might consist of a DLL, for example, that is used by many clients. If we made revisions to our dependency file, we would want to redistribute it to all users; this utility allows us to do this. We want to create a standard executable file, so select Standard Setup Package and click the Next button.

This dialog allows us to specify where we want the setup files to be saved once they have been created. Select where you want them to be saved and then click the Next button

Package and Deployment Wizard - Included Files

The files In the list below will be Induded in your package, Click Add to Include additional files, Clear the checkbox to the left of the file name to remove a file from the package,



1 Source jt

** CodeGenerator.dll

C : \WINDO WS\Desktop\VB


C:\Program Flles\Microsoft VIsl


C:\Program Flles\Microsoft VIsl


C:\Program Flles\Microsoft VIsl


C:\Program Flles\Microsoft VIsl

1 J 1 WEt D 1 ir-.hir.-.o r.l P iK-.n "1





The Included Files dialog shows us what files will be automatically included in the package by Visual Basic. This list is created from the references and components we added to the project. If there are any that we are sure are not needed, we can uncheck the boxes and exclude them from the package. Similarly, if there are any missing, we can make sure they are included by clicking on the Add button and locating the appropriate files.

Dependency Files

A dependency file, which ends in the extension. dep, contains information about what additional files are needed for an application, how these files are to be registered for use and into which specific directories the installed files must be placed on the user's computer. The ' .dep' files are what the Package and Deployment Wizard looks for when packaging the application - this file gives the wizard the information it needs to be able to include all of the relevant files in a setup file.

A standard packaged application will have its dependency information stored in a file called Setup .1st, which is separate to the package. An Internet package will store its dependency information in a file ending with the extension ' .ini', which is part of the packaged application.

There are two types of file that can contain dependency information:

Component '. dep' files; thesefiles list all of the files that are needed for an individual component to work. If a component you have developed can be used in another project, you would create one of these ' .dep' files to tell the next user what information they need and where to find it.

VB6dep.ini file; this file contains the dependency information for the whole environment of Visual Basic and can be found in the '\Wizards\PDWizard' subdirectory of the main Visual Basic directory. This file also contains information on what files are not to be included with your packaged application - this may be because the files need another component to install them.

Visual Basic Projects Hotel Managment

This dialog allows us to specify whether we wish to distribute our application in a single file or in several smaller files. The application will be distributed in Cabinet (Cab) files. These are compressed files, which work similarly to Zip files; each Cab file can contain a number of files which must be extracted before they can be used. In this dialog, we can specify the number of Cab files we want to create and the size of each file. If we plan to distribute this application on floppy disks, then we will want to select the Multiple Cabs option and limit the size of each Cab to 1.44 megabytes. Do this and click on the Next button.

This step asks us what we would like the title of our setup package to be. Click the Next button.

Visual Basic Startup Menu

The Start Menu Items dialog allows us to place files in the startup folder, or in the folder that will be created specifically for your application, so that they will be accessible from the Start button. This is a great place to put other executables or help files that are part of your application. Click on the Next button to accept the default values. This takes us to the Install Locations dialog, where we can specify the folders where our individual files will be saved:

For the most part, Visual Basic knows where the associated files need to be placed, but the Install Locations dialog gives us the option of changing the defaults and placing files in a specific directory. If, for example, we want to place a specific DLL in the application path rather than the Windows Directory, we can change this here. Click on the Next button to accept the defaults.

We now have just one final decision to make before the package is created. Visual Basic will identify any applications or DLLs that might be candidates to be shared by other applications. In this case, VB has identified the CodeGenerator . dll and the MDAC_TYP. exe file. If you want to share the file, click in the box next to the filename. In this case, just click on the Next button, since we don't want any other applications using our program!

The last dialog is the Finished dialog. Here we can save the script by name so that we can re-use it if we want to make any modifications later. It is quite common to want to modify the setup utility later, so always choose a name that is logical to the project. Finally, click on the Finish button.

It may take a few minutes to build and copy the files to your drive. When this process has been completed, the dialog shown above will appear, giving us detailed information about the package. This information will change from application to application. Be sure to read the comments closely then click on the Close button. You will be brought back to the original dialog. Click on the Close button unless you want to build another setup utility.

So, now that you have your packaged application, how do you make sure that your end users will be able to install it onto their machines? There are a number of ways that you can do this, as I will now go on to explain.

Was this article helpful?

0 0
365 Days Of Motivation

365 Days Of Motivation

Stop Wasting Time And Learn How To Stay Motivated. Finally! Discover How To Stop Your Mind From Wandering, And Upgrade Your Motivation. You Can Hack Your Motivation Levels, Allowing You To Take Your Life To The Next Level.

Get My Free Ebook

Post a comment