MSI Bootstrap Loader

By default, MSI installers are built and distributed as .msi database files. However, this requires that the target system contains the correct version of Windows Installer. If the target system does not contain Windows Installer or an earlier version, the installation will fail.

To prevent this type of problem, Tarma ExpertInstall can include a small program with your installation package that checks the minimum required Windows Installer version and optionally installs or updates Windows Installer on the target system, before installing your own installation package. This type of pre-install program is commonly called a bootstrap loader; the resulting installation package is an .exe program file that internally contains the original .msi installation database.

What the bootstrap loader does

During installation, the bootstrap loader performs the following actions:

  1. It checks the target system's Windows Installer version and compares it to the minimum required version as specified in the MSI version field in the MSI Configuration pane.
  2. If the target system's version is equal to or greater than the minimum required version, continue with step 6. Else, continue with step 3.
  3. Do the first of the following that applies:
    1. If the installation package includes an MSI redistributable for the target platform, extract the redistributable to a temporary file.
    2. If the installation package includes a download URL for the target platform, ask the user for permission to download the redistributable and store it in a temporary file.
    3. Cancel the installation with an error message.
  4. Verify the digital signature on the redistributable file from the previous step, then do one of the following:
    1. If the digital signature is valid, continue with step 5.
    2. If the digital signature is not valid, cancel the installation with an error message.
    3. If the digital signature cannot be verified or is not present, ask the user for permission to continue.
  5. Run the redistributable file in order to install or update Windows Installer. System reboots are suppressed. If the redistributable returns an error code, the installation is cancelled.
  6. Verify the integrity of the embedded .msi package. If this fails, cancel the installation with an error message.
  7. Extract the embedded .msi package and run Windows Installer with the package. All command line options (the Default args field in the MSI Configuration pane, any piggy-backed arguments, and any arguments on the command line of the bootstrap loader itself) are passed to the Windows Installer executable MsiExec.exe, along with the /I "package-path" option to identify the installation package.
  8. Wait until the Windows Installer process terminates, then return its exit code as the bootstrap loader's own exit code.

Differences in quiet mode

In quiet mode (indicated by /quiet, /passive, or any /q option except /qf on the aggregate command line for the installer), the bootstrap loader behaves in a slightly different way:

Other benefits of the bootstrap loader

Using an MSI bootstrap loader has other benefits as well: