Downloading an Installation from the Internet

Windows Installer

Downloading an Installation from the Internet

Windows Installer accepts a Uniform Resource Locator (URL) as a valid source for an installation. Windows Installer can install packages, patches, and transforms from a URL location.

If the installation database is at a URL, the installer downloads the database to a cache location before starting the installation. The installer also downloads the files and cabinet files from the Internet source that are appropriate for the user's selections. See A URL-based Windows Installer Installation Example for more information.

For example, to install a package with a source located on a Web server at http://server/share/package.msi, you can use the command line options to install the package and set public properties.

msiexec /i http://server/share/package.msi PROPERTY=VALUE

A command line like the one previously shown should be passed to the installer to start an installation from a Web browser. In general, you should not download and install the package simply by double-clicking the .msi file from within the browser. This downloads the .msi file to the temporary Internet files folder and passes the following command to the installer:

msiexec /i c:\windows\temporary internet files\package.msi

The installation fails if the package requires any external source files or cabinets because these are not located in the same location as the .msi file.

Note that because the Installer object is not marked as SafeForScripting on the user's computer, users need to adjust their browser security settings for the example to work correctly.

The InstallProduct method could be used to run the previous command from a browser as an on-click event.

'Downloading an Installation from the Internet
'The InstallProduct method could be used to run 
'the previous command from a browser as an on-click event.

<SCRIPT LANGUAGE="VBScript"> 
<!-- 
Dim Installer
On Error Resume Next
set Installer=CreateObject("WindowsInstaller.Installer")
Installer.InstallProduct "http://server/share/package.msi", "PROPERTY=VALUE "
set Installer=Nothing
-->
</SCRIPT>

Note that because some Web servers are case sensitive, the FileName field in the File table must match the case of the source files exactly to ensure support of Internet downloads.

See Downloading and Installing a Patch from the Internet. For more information about securing installations and using digital certificates, see Guidelines for Authoring Secure Installations and Digital Signatures and Windows Installer. For more information about how to create a Web installation of a Windows Installer package, see Internet Download Bootstrapping.

Available Internet Protocols

Beginning with Windows Server 2003 and Windows XP, the installer can use the HTTP, HTTPS and FILE protocols. The installer does not support the FTP and GOPHER protocols.

Windows Installer version 2.0 can use the HTTP, FILE, and FTP protocols and cannot use the HTTPS and GOPHER protocols.

Send comments about this topic to Microsoft

Build date: 8/13/2009

© 2009 Microsoft Corporation. All rights reserved.