Visual Basic Concepts

Starting the Package and Deployment Wizard

The Visual Basic Package and Deployment Wizard makes it easy for you to create the necessary .cab files and setup programs for your application. Like other wizards, the Package and Deployment Wizard prompts you for information so that it can create the exact configuration you want.

There are three ways you can start the Package and Deployment Wizard:

  • You can run it from within Visual Basic as an add-in. If you run the wizard as an add-in, you must first set the necessary references in the Add-In Manager to load the wizard. When you use the wizard as an add-in, Visual Basic assumes that you want to work with the project you currently have open. If you want to work with another project, you must either open that project before starting the add-in, or use the wizard as a stand-alone component.

  • You can run it as a stand-alone component from outside the development environment. When you run the wizard as a stand-alone component, you are prompted to choose the project on which you want to work.

  • You can start it in silent mode by launching it from a command prompt. See "Running the Wizard in Silent Mode" in this topic for more information.

After you start the wizard, a series of screens prompt you for information about your project and let you choose options for the package. Each screen explains how it is to be used, including which information is optional, and what information must be entered before you can move to the next screen. If you find that you need more information on any screen, press F1 or click the Help button.

Note   You should save and compile your project before running the Package and Deployment Wizard.

In most cases, the Package and Deployment Wizard is all you need to create a package that is ready for deployment. However, if you want to customize your packaging process further or provide functionality not supported by the Package and Deployment Wizard, you can modify the Setup Toolkit Project.

To start the Package and Deployment Wizard from within Visual Basic

  1. Open the project you want to package or deploy using the wizard.

    Note   If you are working in a project group or have multiple projects loaded, make sure that the project you want to package or deploy is the current project before starting the wizard.

  2. Use the Add-In Manager to load the Package and Deployment Wizard, if necessary: Select Add-In Manager from the Add-Ins menu, select Package and Deployment Wizard from the list, then click OK.

  3. Select Package and Deployment Wizard from the Add-Ins menu to launch the wizard.

  4. On the main screen, select one of the following options:

    • If you want to create a standard package, Internet package, or dependency file for the project, click Package.

    • If you want to deploy the project, click Deploy.

    • If you want to view, edit, or delete scripts, click Manage Scripts.

    For an introduction to these options, see "The Package and Deployment Wizard."

  5. Proceed through the wizard screens.

To start the Package and Deployment Wizard as a stand-alone component

  1. If the project you want to package is open, save it and close Visual Basic.

  2. Click the Start button, and then click Package and Deployment Wizard from the Visual Basic submenu.

  3. In the Project list on the initial screen, choose the project you want to package.

    Note   You can click Browse if your project is not in the list.

  4. On the main screen, select one of the following options:

    • If you want to create a standard package, Internet package, or dependency file for the project, click Package.

    • If you want to deploy the project, click Deploy.

    • If you want to view, edit, or delete scripts, click Manage Scripts.

  5. Proceed through the wizard screens.

Running the Wizard in Silent Mode

Using scripts, you may package and deploy your project files in silent mode. In silent mode, the wizard runs without your having to attend it to make choices and move through screens. The wizard packages and deploys your project using the settings contained in a script.

Silent mode is especially useful if you are packaging and deploying as part of a batch process. For example, early in the development of your project, you may use the Package and Deployment Wizard to package your project and deploy it to a test location. You can later create a batch file to perform the same packaging and deployment steps periodically as you update your project.

To package and deploy in silent mode

  1. Open an MS-DOS prompt.

  2. Type the name of the wizard executable, pdcmdln.exe, followed by the path and file name of your Visual Basic project, and the appropriate command line arguments, as shown in the following example:

    PDCmdLn.exe C:\Project1\Project1.vbp /p "Internet Package"
       /d Deployment1 /l "C:\Project1\Silent Mode.log"
    

    Note   You can perform packaging and deployment in a single silent session by specifying both the /p and the /d arguments, as shown in the example above. Otherwise, use either /p or /d.

Argument Description
/p packagingscript Type /p followed by the name of a previously saved packaging script to package the project silently according to the specified script.
/d deploymentscript Type /d followed by the name of a previously saved deployment script to deploy the project silently according to the specified script.
/l path Specifies that the wizard should store all output from the wizard, such as error messages and success reports, to a file rather than displaying them on the screen.

Type /l followed by the path and file name of a file in which output should be stored. If the file does not exist, the wizard creates it.

Tip   If you do not choose to log output using this argument, the wizard will display a dialog box to notify when packaging or deployment is finished. In order to see this dialog box, you may minimize or close other windows.

/e path Specifies a path for the project's executable file, if it is different from the path for the project. This argument allows you to package in silent mode when you are working in a multi-developer environment. You might use this option if development and packaging occur on different computers.

Note   Any file or script name that includes spaces should be enclosed in quotation marks, as shown in the example above.

For More Information   See "Application Packaging with the Wizard" for instructions on how to use the wizard to package your project. See "Application Deployment with the Wizard" for instructions on how to use the wizard to deploy your projects. See "Modifying the Setup Project" for more information on customizing the installation process.