Command Reference

Download file HTTP

Downloads a file from a web site using the HTTP protocol.

Action ID: 2
Action Category: Internet

Settings

Location/Connection

URL (host name, directory and file name)

The full URL of the file to download (e.g. "http://www.yoursite.com/yourdir/extras.exe").

Local download folder

The local folder that you want to download the file to (on the user's system).

Connection timeout (secs)

The connection timeout in seconds for communication between the setup executable and the HTTP site.

Port

The port to connect to on the HTTP server. The standard HTTP port 80 is used by default.

Download Verification

Verify file size

If selected, the client will verify the size of the downloaded file once the download is complete. If the size of the downloaded file doesn't match the size in the File size (bytes) field, this action will generate an error (error # 13).

File size (bytes)

The size of the original file in bytes.

Verify file CRC

If selected, the setup executable will verify the CRC value of the downloaded file once the download is complete. If the CRC value of the downloaded file doesn't match the value in the File CRC field, this action will generate an error (error # 14).

File CRC

The CRC value of the original file.

Authentication

This section allows you to specify a user name and password if the URL is protected by basic HTTP authentication.

Use HTTP basic authentication

If checked, basic HTTP authentication information will be included in the HTTP request.

User name

The user name to use during authentication.

Password

The password to use during authentication.

Proxy Settings

This section allows you to specify proxy settings if your users will need to download files through a proxy server. You can fill in these fields with hard-coded values if your setup will be distributed internally and you know the appropriate settings to use. If you are not sure whether your users will be using a proxy server, you should use custom variables in these fields and then create a screen that asks them for the values at run-time.

Proxy server address

The address of the proxy server. For example, "proxy.yourserver.com". Usually you will use a custom variable here such as %UserProxyAddress% and fill the variable in from a screen.

Proxy server port

The port that should be used on the proxy server. The default is 80. Usually you will use a custom variable here such as %UserProxyPort% and fill the variable in from a screen.

User name

The user name that should be used with the proxy server. Usually you will use a custom variable here such as %UserProxyUserName% and fill the variable in from a screen.

Password

The password that should be used with the proxy server. Usually you will use a custom variable here such as %UserProxyPassword% and fill the variable in from a screen.

Return Values

Value
(%LastErrorNum%)

Simple Message
(%LastErrorMsg%)

Verbose Message
(%LastErrorDetails%)

0 (OK)

 

 

1

Failed to download file from Web.

Unable to connect to server or proxy server.
<<URL>>

2

Failed to download file from Web.

Request denied by server.
<<URL>>

3

Failed to download file from Web.

Invalid URL supplied.
<<URL>>

4

Failed to download file from Web.

Operation terminated before completion.
<<URL>>

5

Failed to download file from Web.

An invalid type has been specified.
<<URL>>

6

Failed to download file from Web.

Unable to open specified data source.
<<URL>>

7

Failed to download file from Web.

Timeout occurred.
<<URL>>

8

Failed to download file from Web.

Socket receive error occurred.
<<URL>>

9

Failed to download file from Web.

Data source write error.
<<URL>>

10

Failed to download file from Web.

Operation aborted.
<<URL>>

11

Invalid parameter

Connection timeout.
<<URL>>
<<Timeout>>

12

Failed to download file from Web.

Failed to set port.
<<URL>>

13

Failed file verification.

File size is incorrect.
<<URL>>
<<LocalPath>>

14

Failed file verification.

File CRC is incorrect.
<<URL>>
<<LocalPath>>

50

Failed to download file from Web.

Error code returned by server.
<<URL>>

Example

In this example we will download the evaluation version of Visual Patch 1.0 from Indigo Rose's Web site.

URL: http://www.indigorose.com/files/vpatch10ev.exe
Local download folder: %SrcDir%\Downloads
Connection timeout: 40
Port: 80
Verify file size: Unchecked
Verify file CRC: Unchecked

 

See Also: Alphabetical List of Actions, Categorical List of Actions, On Error tab