Muokkaa

Jaa


Internet Download Bootstrapping

With Windows Installer, a configurable bootstrap executable (Setup.exe) and configuration tool (Msistuff.exe) is included in the Windows SDK Components for Windows Installer Developers. By using Msistuff.exe to configure the resources in Setup.exe, developers can easily create a web installation of a Windows Installer package.

The minimum installer version required by the bootstrap executable is Windows Installer version 2.0. Applications can get the installer version by using DllGetVersion. For more information see, Determining the Windows Installer Version

The bootstrap executable provided with the Windows Installer SDK does the following:

  • Calls WinVerifyTrust to verify the digital signature of the .msi file. Windows Installer version 2.0 and later versions provides a Subject Interface Package (SIP) to enable signing of Windows Installer packages.
  • If necessary upgrades the version of the Windows Installer on the machine.

The following resources of Setup.exe can be displayed or configured using Msistuff.exe.

Resource ID Description
ISETUPPROPNAME_BASEURL The base URL location of Setup.exe. If no value is specified the location of Setup.exe defaults to removable media. Only URL-based installs are subject to a check with WinVerifyTrust. The trailing forward slash on the URL is optional. This resource is optional.
ISETUPPROPNAME_DATABASE The name of the .msi file. This is a relative path to the .msi file specified relative to the location of the Setup.exe program. This resource is required if the resource ISETUPPROPNAME_PATCH is not specified. ISETUPPROPNAME_DATABASE and ISETUPPROPNAME_PATCH cannot both be specified. Only one of the two can be specified.
ISETUPPROPNAME_OPERATION The type of operation to perform. Possible values are INSTALL, MINPATCH, MAJPATCH and INSTALLUPD. The INSTALL value equates to the first time installation of the package. The MINPATCH value indicates that the patch specified in the PATCH property is a small or minor upgrade patch. The MAJPATCH value indicates that the patch specified in the PATCH property is a major update patch. INSTALLUPD indicates that the installation could be a first time installation or an update. Use of INSTALLUPD has the bootstrap check for the presence of the product. If the product is present, then the recache package flag is set and a reinstall is performed; otherwise, a regular installation is performed. Note that INSTALLUPD should only be used for small and minor upgrade packages where the product code is not changing. In a major upgrade, REINSTALL is not required because the product code changes, in essence creating a brand new product. The Upgrade table authoring in addition to the FindRelatedProducts, MigrateFeatureStates, and RemoveExistingProducts actions handle upgrading of the original product. Thus, the INSTALL option is sufficient. If this resource is missing, the INSTALL operation is assumed if the ISETUPPROPNAME_DATABASE property is authored. Otherwise, MINPATCH is assumed if the ISETUPPROPNAME_PATCH property is authored. This is an optional value.
ISETUPPROPNAME_PRODUCTNAME The name of the product. This is the name used in the banner text in the downloaded user interface. This resource is optional. If omitted, the name defaults to "the product".
ISETUPPROPNAME_MINIMUM_MSI The minimum version of the Windows Installer required. If the minimum version of the Windows Installer is not installed on the computer, the appropriate Instmsi.exe is called to upgrade the Windows Installer. The value of this property has the same format as the PID_PAGECOUNT value. For more information, see the Page Count Summary property. This value must be at least 200, the value that identifies the Windows Installer version 2.0. This resource is required.
ISETUPPROPNAME_INSTLOCATION The base URL location of the Windows Installer upgrade executables. This resource may be omitted. If this value is omitted, the default location of the upgrade executables is the location of Setup.exe.
ISETUPPROPNAME_INSTMSIA The name of the ANSI version of the Windows Installer upgrade executable. This is a relative path to the ANSI version of Instmsi.exe relative to the location specified by ISETUPPROPNAME_INSTLOCATION. This resource is required.
ISETUPPROPNAME_INSTMSIW The name of the Unicode version of the Windows Installer upgrade executable. This is a relative path to the Unicode version of Instmsi.exe relative to the location specified by ISETUPPROPNAME_INSTLOCATION. This resource is required.
ISETUPPROPNAME_PATCH The name of the .msp file. This is a relative path to the .msp file specified relative to the location of the Setup.exe program. This resource is required if the resource ISETUPPROPNAME_DATABASE is not specified. ISETUPPROPNAME_DATABASE and ISETUPPROPNAME_PATCH cannot both be specified. Only one of the two can be specified.
ISETUPPROPNAME_PROPERTIES The PROPERTY=VALUE strings. These are the PROPERTY=VALUE pairs to include on the command line. This option is optional.

 

For example, the following ISETUPPROPNAME_BASEURL and ISETUPPROPNAME_DATABASE values would be used for the following hypothetical package locations.

Actual package location Resource values
https://www.blueyonderairlines.com/Products/Product1/product1.msi ISETUPPROPNAME_BASEURL = https://www.blueyonderairlines.com/Products/Product1 ISETUPPROPNAME_DATABASE = product1.msi
https://www.blueyonderairlines.com/Products/Product1/product1.msi ISETUPPROPNAME_BASEURL = https://www.blueyonderairlines.com/Products/Product1 ISETUPPROPNAME_DATABASE = ../Products1/product1.msi
e:\product1.msi Omit ISETUPPROPNAME_BASEURL. ISETUPPROPNAME_DATABASE = product1.msi
e:\setup\product1.msi (The currently running location of Setup.exe is e:\setup.exe.)
Omit ISETUPPROPNAME_BASEURL. ISETUPPROPNAME_DATABASE = Setup\product1.msi

 

Setup.exe Command Line Parameters

The following table lists the command options that can be used with the Setup.exe that is shipped with the Windows SDK Components for Windows Installer Developers. When invoked without any command line options, Setup.exe defaults to the behavior specified via the configured resources. The command line options are mutually exclusive — only one of them can be used at a time.

Option Usage Meaning
/a setup.exe /a Initiates an administrative installation. If the ISETUPPROPNAME_DATABASE property is configured in Setup.exe, then this option can be used to perform an administrative installation of the product. This command line option is not supported if the ISETUPPROPNAME_PATCH resource is configured.
/a setup.exe /a <full-path to an existing administrative install> If the ISETUPPROPNAME_PATCH property is configured in Setup.exe, then this option can be used to patch an existing administrative installation of the product. This command line option is not supported if the ISETUPPROPNAME_DATABASE resource is configured.
/v setup.exe /v <full path to a file> Verifies the signature on the file using WinVerifyTrust. No UI is displayed when this option is used. In this case, the result of the trust check is the return value obtained from the execution of Setup.exe.
/?   Displays a help dialog indicating the valid arguments. Note: The help dialog is also displayed if invalid arguments are supplied.

 

For more information, see A URL Based Windows Installer Installation Example.