![]() |
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
![]() |
![]() |
To access the contents, click the chapter and section titles.
Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6!
Preparing a Visual Basic program for distribution consists of two parts: You must create the setup program that the end user runs to install your program; you must package the program and its setup files so they can be placed on diskettes, a CD-ROM, or the Internet. The setup program is normally created automatically for you, but you have the option of customizing it. Packaging of the program files is accomplished by the Package and Deployment Wizard.
Creating The Setup ProgramAs with most Windows programs, a Visual Basic program is installed by running SETUP.EXE. When you create a distribution package for a Visual Basic program, SETUP.EXE is automatically included as part of the package. This program has basically only one function: to execute the program SETUP1.EXE. This may seem like a strange way to do things, but there is a reason behind it. While SETUP is fixed and cannot be changed, you can customize SETUP1 to meet the specific setup requirements of your program. In fact, SETUP1 is itself a Visual Basic program, located in the folder \VB98\WIZARDS\PDWIZARD\SETUP1. Heres how it works: When you run the Package and Deployment Wizard (covered later in the chapter), it includes SETUP1.EXE, which will be included in your programs distribution package. If you have customized and compiled SETUP1, your changes will be included; otherwise, the default version is used. When would you need to customize SETUP1? To be honest, almost never. I have written and distributed quite a few Visual Basic programs, and I have not needed to do so even once. The possibility does exist, however. For example, you might want to give your users the option of either installing a large Help file to their hard disk or running it from the distribution CD-ROM. The basic procedure for customizing SETUP1 is as follows:
Youll find more detailed information on editing SETUP.LST and other aspects of customizing the setup program in the online Visual Basic Help system. It is not a difficult process, and as I have mentioned, it is something you will rarely need to do. Remember, whether or not you customize your setup, be sure to test it thoroughly before distributing it. The Package And Deployment WizardThe Package and Deployment Wizard (or PD Wizard) is on the same level as sliced bread and indoor plumbing in terms of being a great thing. Assembling all the files needed to distribute your Visual Basic application and packaging them for distribution would be a miserable task without this tool. You can run the PD Wizard either as an add-in in Visual Basic or as a standalone. To run it as an add-in, use the Add-In Manager (select Add-In Manager from the Add-Ins menu in Visual Basic) to load the PD Wizard. Load the project you want to package/distribute into Visual Basic, then run the PD Wizard from the Add-Ins menu. To run it as a standalone, execute the file PDCMDLN.EXE. In either case, when the program starts, youll see the opening screen shown in Figure 26.5.
As the name suggests, the PD Wizard has two functions:
These two functions are accessed via the corresponding buttons on the PD Wizards opening screen. The third button, Manage Scripts, is used to work with scripts that let you automate some of the PD Wizards functions for repetitive tasks. I will not be dealing with script management in this book. Packaging Your Application You have several distribution options when packaging your application:
|
![]() |
Products | Contact Us | About Us | |