Share via


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 的 Windows Vista 和 Windows Server 2008 為 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 可轉散發套件的下載位於:https://www.catalog.update.microsoft.com/Search.aspx?q=893803

    注意

    如果您使用 SP1 安裝 Windows Server 2003 或舊版的可轉散發套件,升級至 Windows Installer 3.1,您可能也需要安裝 Windows Server 2003 Service Pack 1 的 Update(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 Update 獨立安裝程式 安裝 (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 啟動載入