Freetutes.com

VB6 beginners tutorial - Learn VB6

Advanced VB6 tutorial - Learn Advanced VB6

Systems Analysis - System analysis and Design tutorial for Software Engineering


You are here: Visual Basic > Advanced VB6 tutorial > Chapter 21

Creating an Internet Setup Package

As explained in "Choosing the Type of Setup Package," an Internet setup package provides a setup to the user that installs your package as a download over the Internet or intranet.

Internet setup packages are not available for standard EXE applications. You create an Internet setup package by running the Package and Deployment Wizard, choosing the Package option on the first screen, and choosing Internet Setup from the second screen, as mentioned in "Starting Package and Deployment Wizard and Choosing the type of Package" and "Choosing the Type of Setup Package."

The following pages describe the additional steps that you must take to create your Internet setup package.

The Package and Deployment Wizard screens for an Internet setup package are comparable to the Package and Deployment Wizard screens for a standard setup package. The following is a brief description of the steps for creating an Internet setup package:

  • The Package Folder dialog box is the same as the Package Folder dialog box for a standard setup (see preceding section).

  • The Included Files dialog box is the same as the Included Files dialog box for a Standard setup (see preceding section), although typically you will see fewer files listed.

  • The File Source dialog box, shown in Figure 21.14, is unique to the Internet setup. This dialog box enables you to specify where users will get the files for this setup when their browsers attempt to install the application. For the component files that you create, you may specify the current CAB file being created as the source, or you may specify an alternative URL as the source.

    The Package and Deployment Wizard’s File Source dialog box (Internet package setup only).
    FIGURE 21.14 The Package and Deployment Wizard’s File Source dialog box (Internet package setup only).

    For the VB6 runtime files, you may also specify the Microsoft Web site as the source for the files (as illustrated in the figure). Specifying the Microsoft Web site option guarantees that users installing your application will always get the latest version of the VB6 runtime.

  • The Safety Settings dialog box, shown in Figure 21.15, is also unique to an Internet Package setup. The meaning of the two options, Safe for Scripting and Safe for Initialization, is as follows:

    • Safe For Scripting means that the component can’t be used to corrupt the user’s computer or get unauthorized information from the user’s computer.

    • Safe for Initialization means that the component cannot be used to do harm on a user’s computer when it is initialized.

    The Package and Deployment Wizard’s Safety Settings dialog box (Internet package setup only).
    FIGURE 21.15. The Package and Deployment Wizard’s Safety Settings dialog box (Internet package setup only).

These screens provide a Package and Deployment Wizard (Internet package setup only).

When the Internet package setup completes, you will find a CAB file (containing the files to be distributed) and an HTML file in the designated package directory. This HTML file contains the information that you would need to embed in a Web page so that browsers will download your application. Listing 21.1 shows an example of the contents of such an HTML file.

LISTING 21.1
HTML CODE NECESSARY TO IMPLEMENT AN INTERNET DOWNLOAD FOR YOUR APPLICATION’S PACKAGE

<HTML>
<HEAD>
<TITLE>Project1.CAB</TITLE>
</HEAD>
<BODY>
<OBJECT ID="Class1"
CLASSID="CLSID:F4B1B409-7C2F-11D2-9C45-00A024C3B222"
CODEBASE="Project1.CAB#version=1,0,0,0">
</OBJECT>
</BODY>
</HTML>

When users navigate to a Web site containing this code, their browsers will begin a background download of your application.

If you look in the Support folder created under the package directory, you will see the following:

  • The application’s file or files (EXEs, DLLs, or OCX files, for example).

  • An INF file. This file is only created for Internet download packages and becomes part of the CAB file. It is a text file that contains dependency information needed by the end user’s browser. Based on the information in the INF file, the browser will download and install other files that your application needs to run.

  • The batch (BAT) file needed to run the MakeCab utility and re-create the CAB file.

  • The DDF file that the MakeCab utility needs to read to find instructions on how to create the CAB file.


  

<< Previous | Contents | Next >>

Home | About Us | Privacy Policy | Contact Us

Copyright © Freetutes.com | All Rights Reserved