Windows Installer 可再发行组件

Windows Installer 4.5 及更早版本可用作可再分发的软件更新包。 请参阅“Windows Installer 的发布版本”部分,以确定哪些产品附带了 Windows Installer 的版本。 在发布附带特定 Windows Installer 版本的产品后,版本的可再发布更新包即可用。

注意

Windows Installer 5.0 没有可再发布组件。 此版本包含在 Windows 7、Windows Server 2008 R2 及更高版本客户端和服务器版本(包括 Windows 10)的操作系统中。

获取 Windows Installer 可再分发组件(4.5 及更早版本)

  • 你可以在 Microsoft 下载中心找到所有可用的 Windows Installer 可再分发组件。

  • Windows Installer 4.5 可再分发包的下载在以下位置提供:https://go.microsoft.com/fwlink/p/?LinkID=101159

  • 在运行 Windows Vista、Windows Vista(带有 Service Pack 1 (SP1))和 Windows Server 2008 的基于 x86 的计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 Windows6.0-KB942288-v2-x86.MSU。

  • 在运行 Windows Vista、Windows Vista(带有 SP1)和 Windows Server 2008 的基于 x64 的计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 Windows6.0-KB942288-v2-x64.MSU。

  • 在运行 Windows Vista、Windows Vista(带有 SP1)和 Windows Server 2008 的基于 Itanium 的系统计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 Windows6.0-KB942288-v2-ia64.MSU。

  • 在运行 Windows XP(带有 Service Pack 2 (SP2))和 Windows XP(带有 Service Pack 3 (SP3))的基于 x86 的计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 WindowsXP-KB942288-v3-x86.exe。

  • 在运行 Windows Server 2003(带有 Service Pack 1 (SP1))和 Windows Server 2003(带有 Service Pack 2 (SP2))的基于 x86 的计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 WindowsServer2003-KB942288-v4-x86.exe。

  • 在运行 Windows Server 2003(带有 SP1)和 Windows Server 2003(带有 SP2)的基于 x64 的计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 WindowsServer2003-KB942288-v4-x64.exe。

  • 在运行 Windows Server 2003(带有 SP1)和 Windows Server 2003(带有 SP2)的基于 Itanium 的系统计算机上安装 Windows Installer 4.5 的可再分发组件的名称是 WindowsServer2003-KB942288-v4-ia64.exe。

  • 没有安装 Windows Installer 4.0 的可再分发组件。 此版本的 Windows Installer 随附 Windows Vista。

  • 安装 Windows Installer 3.1 的可再分发组件的名称是 WindowsInstaller-KB893803-v2-x86.exe。 Windows Installer 3.1 可再分发组件 (v2) 包的下载在以下位置提供:https://www.catalog.update.microsoft.com/Search.aspx?q=893803

    注意

    如果通过安装带有 SP1 的 Windows Server 2003 或较早版本的此可再分发组件升级到 Windows Installer 3.1,则可能还需要安装 Windows Server 2003 服务包 1 的更新 (KB898715),以获取 Windows Installer 3.1 可再分发组件 (v2) 中提供的所有更新。

     

  • 安装 Windows Installer 3.0 的可再分发组件为 WindowsInstaller-KB884016-v2-x86.exe。 Windows Installer 3.0 可再分发组件的下载在以下位置提供:https://archive.org/download/windows-installer-3.0/WindowsInstaller-KB884016-v2-x86.exe

  • Windows Installer 2.0 对可再分发组件使用了以前的命名约定:Instmsi.exe。 在 Windows 2000 上安装或升级到 Windows Installer 2.0 的可再分发组件不应用于在 Windows Server 2003 和 Windows XP 上安装或升级 Windows Installer 2.0。

    Windows NT 4.0 和 Windows 2000 的 Windows Installer 2.0 可再分发组件的下载在 https://archive.org/download/instmsi/instmsi.exe 处提供。

安装 Windows Installer 可再分发组件(4.5 及更早版本)

Windows Installer 4.5 可再分发组件作为 .msu 文件提供给 Windows Vista 和 Windows Server 2008 操作系统,应使用 Windows 更新独立安装程序 (Wusa.exe.) 进行安装

适用于 Windows XP 和 Windows Server 2003 操作系统的 Windows Installer 4.5 可再分发组件可以使用以下命令行语法和选项安装。

Windows Installer 3.1 和 Windows Installer 3.0 可再分发组件可以使用以下命令行语法和选项安装。

语法

使用以下语法在 Windows XP 和 Windows Server 2003 上安装适用于 Windows Installer 4.5 的可再分发组件。

<Name of the Redistributable>\[<options>\]*

命令行选项

Windows Installer 可再分发软件更新包使用以下不区分大小写的命令行选项。

选项 说明
/norestart 阻止可再分发组件包要求用户重新启动,即使它必须替换正在安装过程中使用的文件。 如果使用此选项调用更新包,则如果必须替换正在使用的文件,它将返回 ERROR_SUCCESS_REBOOT_REQUIRED
如果它不必替换正在使用的文件,则将返回 ERROR_SUCCESS。 有关延迟重启的其他信息,请参阅注解部分。
/quiet 供启动应用程序过程中重新分发 Windows Installer 的应用程序使用。 用户界面 (UI) 不会向用户显示。 启动应用程序应检查返回代码,以确定是否需要重新启动才能完成 Windows Installer 的安装。
/help 显示所有可用选项的帮助。

Windows Vista 和 Windows Server 2008 上的延迟重启

/norestart 命令行选项可防止 wusa.exe 重新启动计算机。 但是,如果 MSU 包正在更新的文件在使用中,则在用户重启计算机之前,该包不会应用于计算机。 这意味着,使用适用于 Windows Vista 和 Windows Server 2008 的 Windows Installer 4.5 可再分发组件的应用程序在重启计算机之前无法使用 Windows Installer 4.5 功能。

Windows XP 和 Windows Server 2003 上的延迟重启

建议在使用更新包时停止 Windows Installer 服务。 当该更新包在完整的 UI 模式下运行时,它会检测 Windows Installer 服务是否正在运行并请求用户停止该服务。 如果用户在不停止服务的情况下继续,此更新将替换 Windows Installer。

使用可再分发组件包安装 Windows Installer 和另一个应用程序的启动应用程序除了安装应用程序所需的重新启动之外,还需要额外的系统重启。 延迟重启选项仅在需要消除因安装正在使用的文件而导致的额外重启的情况下才建议使用。 开发人员应在安装应用程序中执行以下操作来使用延迟重启选项。

  • 使用 /norestart 命令行选项调用可再分发组件包。

  • 将返回的 ERROR_SUCCESSERROR_SUCCESS_REBOOT_REQUIRED 视为表示成功。

  • 在应用程序的包上调用 Msiexec,并运行特定于应用程序的其他安装代码。 如果安装应用程序使用 MsiInstallProduct,则该应用程序必须从系统目录中加载 MSI.DLL。 如果未重新启动,并且可再分发组件返回 ERROR_SUCCESS_REBOOT_REQUIRED,则提示用户重新启动以完成 Windows Installer 二进制文件的安装。 如果进行了重新启动,则无需执行其他步骤。

    注意

    在可再分发组件包返回成功后,在新的 MSI.DLL 上调用 LoadLibrary 的应用程序必须确保进程内尚未加载旧版 MSI.DLL。 如果加载了旧版 MSI.DLL,则必须在为新 MSI.DLL 调用 LoadLibrary 之前从进程地址空间中卸载它。

     

有关详细信息,请参阅 Windows Installer 启动