User Guide

518
Download File From Internet
This custom action downloads a file from the Internet.
Tips
! If you place this action in the User Interface or Execute Immediate sequences, you
can use formatted text strings, such as [INSTALLDIR], in the Source URL and
Destination Directory fields. See Formatted in the Windows Installer SDK Help.
! If you place this action in the User Interface or Execute Immediate sequences, you
cannot display progress bar text.
! If you place this action in the Execute Deferred sequence, you must hard-code the
destination and source paths.
! Downloaded files are not uninstalled when the product is uninstalled because
Windows Installer only uninstalls files installed with standard actions, not custom
actions.
Usage
Double-click the custom action and complete the dialog:
! Source URL
Enter the URL of the file to download, including the name of the file.
Example: http://www.site.com/readme.pdf.
! Destination Directory
Specify the file path, including file name, on the destination computer where the file
should be downloaded. Example: [INSTALLDIR]readme.pdf.
! Error Handling
Determine how errors in the download operation are handled.
•Ignore Errors
The installation continues regardless of errors.
Abort Installation
The installation stops if the download operation cannot be completed.
! Progress Bar Text
Enter the text to display in the progress bar during the download. Progress bar text
appears only if this custom action is in the Execute Deferred sequence. You cannot
enter properties or formatted text. The field length is limited to 64 characters and 2
lines.
Also see:
Launch Web Page on page 524
Post Data to HTTP Server on page 525
Guidelines for Custom Action Location on page 499
End Statement
The End Statement action marks the end of an If action, which specifies conditions to
attach to an action or a set of actions. The End Statement action takes no parameters,
and double-clicking it in the Actions list immediately inserts it into the script above the
selected script line.
Also see If Statement on page 521.