Platform SDK: Windows Installer |
Instmsi.exe
InstMsi is the redistributable package for installing the Windows Installer. For more information about which version of the Windows Installer was shipped with your operating system, see Released Versions of Windows Installer. Some redistributables should not be run on certain versions of the operating system. The following table describes which Instmsi is compatible on which operating system.
If The Instmsi Installs This Version of the Windows Installer | This Instmsi Can Be Run On These Operating Systems | This Instmsi Must Not Be Run On These Operating Systems |
---|---|---|
Windows Installer version 1.0 | Windows 95, Windows 98, Windows NT 4.0+SP3 | Windows Me, Windows 2000, Windows XP |
Windows Installer version 1.1 | Windows 95, Windows 98, Windows NT 4.0+SP3 | Windows Me, Windows 2000, Windows XP |
Windows Installer version 1.2 | Windows 95, Windows 98, Windows Me, Windows NT 4.0+SP3 | Windows 2000, Windows XP |
Windows Installer version 2.0 | Windows 95, Windows 98, Windows Me, Windows NT 4.0+SP6, Windows 2000 | Windows XP |
For example, an application that redistributes Windows Installer version 1.1 should check that the operating system is Windows NT 4.0 SP3 or Windows 95/98 before running the redistributable package. Applications using the redistributable package should also ensure that the ANSI version of the Windows Installer is installed on Windows 95/98, and that the Unicode version is installed on Windows NT or Windows 2000. Note that some applications rename the Unicode version to InstMsiW.
Syntax
instmsi options
Command Line Options
The command line options are case-insensitive.
Option | Description |
---|---|
/q | For use by applications that redistribute the Windows Installer as part of a bootstrapping application. No UI is presented to the user. The bootstrapping application should check the return code to determine whether a reboot is needed to complete the installation of the Windows Installer. |
/t | Used for debugging purposes only. |
/c:"msiinst /delayreboot" | The delayed reboot option. Prevents Instmsi from prompting
the user for a reboot even if it had to replace files that were in use
during the installation. If Instmsi is invoked with this option, it
returns ERROR_SUCCESS_REBOOT_REQUIRED if it had to replace files that were
in use. If it did not have to replace files that were in use, it returns
ERROR_SUCCESS. Available with Instmsi for Windows Installer version 2.0 or
later.
See the remarks section for additional information on delayed reboots. |
/c:"msiinst /delayrebootq" | The quiet version of the delayed reboot option. It does
not present any UI to the user. Otherwise the behavior is identical to the
previous option. Available with Instmsi for Windows Installer version 2.0
or later.
See the remarks section for additional information on delayed reboots. |
/? | Displays help. |
Remarks
Bootstrapping applications that use Instmsi.exe to install the Windows Installer with another application may require an extra system reboot. This is potentially an extra reboot in addition to any reboots needed to install the application.
The delayed reboot option is only recommended for setup developers who want to eliminate an extra reboot caused by using Instmsi with a setup application that installs files that are in use.
Developers should do the following in their setup application to use the delayed reboot option. This option is not available with Instmsi.exe versions that install Window Installer versions earlier than version 2.0.
- Call Instmsi with one of the delayed reboot command line options.
- Treat the return of either ERROR_SUCCESS or ERROR_SUCCESS_REBOOT_REQUIRED as meaning success.
- Get the path to the folder containing the newly installed Windows Installer binaries from the InstallerLocation value under HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer. This value is of type REG_SZ.
- Set the current directory to the path obtained in step 3.
- Invoke Msiexec on the application's package and run other setup code specific to the application. If the setup application uses MsiInstallProduct, then the application must load msi.dll from the location obtained in step 3.
- If step (5) does not require a reboot and if Instmsi had returned ERROR_SUCCESS_REBOOT_REQUIRED in step (1), prompt the user for a reboot to complete the setup of the Windows Installer binaries on the system. However, if a reboot occurs in step (5), no additional steps are required.
See Also
Windows Installer Development Tools, Bootstrapping, Internet Download Bootstrapping
'
|