Download VB5 User's Guide
Transcript
Chapter 17. Distributing Your Applications Once you have created a Visual Basic application, you may want to distribute it to others. You can freely distribute any application you create with Visual Basic to anyone who uses Microsoft Windows. If you are going to distribute your application, you will need to write or use a setup program that installs your application onto a user?s machine. This chapter shows you how to create a professional setup program for your application. Contents Creating a Setup Program Files You Are Allowed to Distribute Using the Visual Basic Setup Wizard Using the Setup Toolkit Testing Your Setup Program Allowing the User to Remove Your Application Using the Setup Wizard with the Setup Toolkit Creating a Setup Program Once you’ve created an application that you would like to distribute to others, you need to create a setup program to properly install your application. Visual Basic’s Setup Wizard does most of this work for you. It can determine which files you’ll need to distribute, determine where they’ll need to be installed on the user’s machine, enter them in the system registry, and create a Program Group and Start Menu links in Windows. You need to decide which media you want to use to distribute your application. For example, you can create disks or install your application to a network server or on the Internet. In most cases, the Setup Wizard can handle everything you’ll need for your setup program. If, however, you want to customize your setup program to meet some special need or functionality, you can use the Setup Toolkit to create a modified or enhanced setup program. The Setup Wizard vs. The Setup Toolkit The Setup Wizard is, essentially, a helper program that walks you through the steps necessary to create a professional setup program for your Visual Basic application. The setup program that the wizard creates for you is compiled from the Visual Basic Setup Toolkit project, which resides in the \Setupkit\Setup1 directory of your Visual Basic installation. Like any other Visual Basic project, the forms, code, and functionality of the setup project can be modified or enhanced. In most cases, the Setup Wizard is the best way to create a setup for your application. If, however, you want to write a setup program that has features and functionality not provided by the Setup Wizard, you can do so by modifying the Setup Toolkit project. For More Information See "Using the Setup Toolkit" later in this chapter. Caution If you determine that you need to modify the Setup Toolkit project to add some functionality not already provided, make sure that you copy the Setup Toolkit project into a new directory to serve as a backup before changing the source code in the Setup1 directory. Any modifications you make to the Setup Toolkit project will affect any subsequent setup programs created with the Setup Wizard. Note The Setup Wizard and the Setup Toolkit create setup programs and distribution media only for Visual Basic