Indigo Rose Software
  #1  
Old 10-23-2002
Support Support is offline
Super Moderator
 
Join Date: Jan 2000
Location: Indigo Rose Corporation
Posts: 204
HOWTO: Download and Install Files from the Web

HOWTO: Download and Install Files from the Web

HOWTO: Download and Install Files from the Web

Document ID: IR02034
The information in this article applies to:
  • Setup Factory 6.0

SUMMARY

This article explains how to download and install files from the web using Setup Factory 6.0.

DISCUSSION

Downloading and installing files from the Internet was made possible in Setup Factory 6.0 with the addition of three features:

  • The Download file HTTP action
  • The Install File action
  • The %AdditionalDiskSpace% built-in variable

The Download file HTTP action allows you to download files from the Internet. The Install File action allows you to install files manually onto the end user's computer. It automatically performs the same checks that Setup Factory does when installing any of the files located on the Archive or CD-ROM tab in the Setup Factory design environment. The %AdditionalDiskSpace% built-in variable allows you to add extra disk space to the Space required on drive calculation that is displayed on the Select Install Folder Screen.

The first step when downloading and installing files from the web is to set up your download file HTTP action. In this example we will download the file: "AdditionalData.DAT" from: "HTTP:\\www.MyWebArea.com\files\". We will download the file to the user's temporary directory, using the built-in variable %TempDir%. The action would look something like this:

URL: HTTP:\\www.MyWebArea.com\files\AdditionalData.DAT

Local download folder: %TempDir%

Connection timeout: 40

Port: 80

Verify file size: Unchecked

Verify file CRC: Unchecked

This action can occur on any event during the installation but must occur before the Install File action.

Tip: It is a good idea to allow the user to decide if they want to download the file or not. You can never be sure of the speed, reliability of your user's Internet Connection, or if they are even connected to the Internet. So your best bet is to let them decide if they want to download the file or not.

Once the file has been downloaded from the Internet the next step is to install the file. This will be done using the Install File action. In this example we will install the file "AdditionalData.DAT" that we just downloaded from the Internet and saved in %TempDir%. We will install the file to our application directory: %AppDir%.

Source: %TempDir%\AdditionalData.DAT

Destination: %AppDir%

If file already exists: Overwrite if existing file is same or older

Create Backup: Unchecked

Shared/System file: Checked

Usually the Install File action should occur right after the Download File HTTP action.

The last step is to account for the additional disk space that "AdditionalData.DAT" will take on the user's system. The built-in variable %AdditionalDiskSpace% will be used to accomplish this. %AdditionalDiskSpace% represents additional disk space (in bytes) that will be added to the required disk space calculation displayed on the Select Install Folder screen. "AdditionalData.DAT" is 524 Kilobytes.

Since %AdditionalDiskSpace% requires the disk space to be represented in bytes we will have to convert the size of "AdditionalData.DAT" (524 KB) into bytes. 1 Kilobyte is 1024 Bytes, so to convert from Kilobytes to Bytes, simply multiply the Kilobyte number by 1024. Therefore "AdditionalData.DAT" is 536576 Bytes. This means that we will have to set %AdditionalDiskSpace% to 536576 since we need 536576 Bytes of additional Space. We will set %AdditionalDiskSpace% using an Assign Value action:

Variable name: %AdditionalDiskSpace%

Value: 536576

Setting the value of %AdditionalDiskSpace% must occur before the Select Install Folder screen is displayed.

Note: The %AdditionalDiskSpace% variable was introduced in version 6.0.1.1 of Setup Factory.

Note: %AdditionalDiskSpace% only effects the disk space calculation on the Select Install Folder screen. If this screen is not displayed during the installation process, %AdditionalDiskSpace% will have no effect.

MORE INFORMATION

For more information please see the following links in the Setup Factory 6.0 help file:

  • Command Reference | Actions | Individual Actions | Download file HTTP
  • Command Reference | Actions | Individual Actions | Install File
  • Command Reference | Actions | Individual Actions | Assign Value
  • KEYWORDS: Setup Factory 6.0, Download, Install, Web, Internet


    Last reviewed: February 20, 2003

    Copyright © 2003 Indigo Rose Corporation. All rights reserved.

     

    Thread Tools
    Display Modes

    Posting Rules
    You may not post new threads
    You may not post replies
    You may not post attachments
    You may not edit your posts

    BB code is On
    Smilies are On
    [IMG] code is On
    HTML code is On



    All times are GMT -6. The time now is 05:23 PM.


    Powered by vBulletin® Version 3.8.4
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
    Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
    Indigo Rose Software