2019年4月2日 星期二

Windows 更新獨立安裝程式,在 Windows 中的描述

Windows 更新獨立安裝程式,在 Windows 中的描述

轉載至 https://support.microsoft.com/zh-tw/help/934307/description-of-the-windows-update-standalone-installer-in-windows

適用於: Windows Vista 家用入門版Windows Vista 家用進階版Windows Vista 旗艦版Windows Vista 商用入門版Windows Vista 商用進階版Windows Vista StarterWindows Server 2008 DatacenterWindows Server 2008 EnterpriseWindows Server 2008 StandardWindows Server 2008 for Itanium-Based SystemsWindows 7 Home BasicWindows 7 Home PremiumWindows 7 ProfessionalWindows 7 UltimateWindows Server 2008 R2 DatacenterWindows Server 2008 R2 EnterpriseWindows Server 2008 R2 StandardWindows 8Windows 8 EnterpriseWindows 8 ProWindows Server 2012 DatacenterWindows Server 2012 DatacenterWindows Server 2012 EssentialsWindows Server 2012 FoundationWindows Server 2012 FoundationWindows Server 2012 StandardWindows Server 2012 StandardWindows 8.1 EnterpriseWindows 8.1 ProWindows 8.1Windows Server 2012 R2 DatacenterWindows Server 2012 R2 StandardWindows Server 2012 R2 EssentialsWindows Server 2012 R2 FoundationWindows 10 更少


重要:這篇文章是由 Microsoft 軟體自動翻譯的結果,並非由專業譯者所翻譯。 Microsoft 提供由專業人員所翻譯的文章、由自動翻譯功能所產生的文章,以及由 Microsoft 社群翻譯的文章,讓您能夠存取以您的語言顯示的所有知識庫文章。 請務必注意,由自動翻譯功能所產生的文章,包括那些經過 Microsoft 社群審閱過的文章,都可能含有詞彙、語法或文法上的錯誤。 對於不準確或錯誤,或是因不正確的內容翻譯或使用方式翻譯所造成的任何損害,Microsoft 可能無法負任何責任。
檢視原始英文文章:934307
簡介


本文將告訴您 Windows 更新獨立安裝程式 (Wusa.exe) 下列 Windows 作業系統中︰

·         Windows Vista
·         Windows 2008 Server
·         Windows 7
·         Windows Server 2008 R2
·         Windows 8
·         Windows Server 2012
·         Windows 8.1
·         Windows Server 2012 R2
·         Windows 10
·         Windows 伺服器 2016年技術預覽
Wusa.exe 檔案是在 %windir%\System32 資料夾中。Windows Update 獨立安裝程式會使用 Windows Update Agent API 來安裝更新套件。更新套件有.msu 檔案的副檔名。.Msu 檔案的副檔名是與 Windows 更新的獨立安裝程式相關聯。
更多的資訊


.Msu 檔案包含下列內容。

內容
描述
Windows 更新的中繼資料
描述.msu 檔案所包含的每個更新套件。

一或多個.cab 檔案
每個.cab 檔案都代表一個更新。

.Xml 檔案
這個.xml 檔會描述.msu 更新套件。當您使用封裝管理員工具 (Pkgmgr.exe) 執行自主式的安裝的更新時,Wusa.exe 會使用.xml 檔案。

例如,您可以下載 hotfix 934307Windows6.0-KB934307-x86.msu 檔案是在 C:\934307 資料夾中。在 [命令提示字元將.msu 檔案展開到暫存資料夾中輸入下列命令︰

展開-f: *"C:\934307\Windows6.0-KB934307-x86.msu"%TEMP%

然後,您會在命令提示字元輸入下列命令︰

pkgmgr.exe /n:%TEMP%\Windows6.0-KB934307-x86.xml
內容檔案
這個檔案包含 Wusa.exe 所使用的字串屬性。例如,這個檔案包含相關的文件 「 Microsoft 知識庫 」 中的文的標題。


當您使用 Wusa.exe 來安裝更新套件時,Wusa.exe 便會.msu 檔案的內容展開到暫存資料夾。然後,Wusa.exe 會執行下列步驟︰
1.       Wusa.exe.msu 檔案中使用 Windows 更新的中繼資料,以搜尋適用的更新程式。
2.       Wusa.exe 會將適用的更新程式的內容複製到 Windows Update 沙箱。Windows Update 沙箱是受保護的資料夾。
3.       Wusa.exe 會呼叫適當的函式,在 Windows 更新代理程式 API,根據您要在其中啟動 Wusa.exe 的模式。
4.       Windows 更新精靈 完成安裝時,Windows 更新代理程式 API 傳回的狀態。然後,Wusa.exe 會以同步方式與 Windows 更新代理程式 API
注意.Msu 更新套件中的每個更新會安裝在不同的工作階段。當您使用 Wusa.exe,就會執行 Wusa.exe 只有一個執行個體。Wusa.exe 不會變更.msu 檔案中的更新內容。Windows Update 基礎結構的執行內容根據更新的必要的動作。

當您以互動模式中啟動 Wusa.exe 時,歡迎使用畫面會顯示有關更新的高階資訊。如果您繼續安裝此更新程式,則 Wusa.exe 會呼叫適當的函式中 Windows 更新代理程式 API 來啟動 Windows 更新精靈 」。「 Windows 更新精靈 會顯示與更新套件相關聯的 Microsoft 軟體授權合約。Wusa.exe 會呼叫 Windows 更新代理程式 API,繼續安裝。然後,Wusa.exe 會等待,直到 Windows 更新精靈 完成安裝。

若要安裝.msu 更新套件,請執行 Wusa.exe 加上檔案的完整路徑。

比方說,如果 Windows6.0-KB934307-x86.msu 檔案位於 D:\934307 資料夾中,請在安裝更新套件的命令提示字元中輸入下列命令︰
wusa.exe d:\934307\Windows6.0-KB934307-x86.msu
您也可以按兩下此.msu 檔案,安裝更新套件。

若要解除安裝更新,Windows 7 Windows Server 2008 R2 Windows 8 Windows Server 2012,您可以使用 Wusa.exe

注意若要解除安裝更新,Windows Vista Windows Server 2008 中的,您無法使用 Wusa.exe。您可以使用 Windows Defender 軟體總管手動解除安裝更新。如需有關軟體總管的詳細資訊,請前往下列 Microsoft 網站︰

您可以使用下列的參數,與 Wusa.exe

參數
描述
/?, /h, /help
檢視 [說明]

/quiet
執行 Wusa.exe,以無訊息模式,無需使用者互動。此工具執行時以無訊息模式,而且執行時沒有使用者互動。如果需要這樣做,會重新啟動電腦。

比方說,如果 Windows6.0-KB934307-x86.msu 檔案位於 D:\934307 資料夾中,請在安裝更新套件,無需使用者互動命令提示字元中輸入下列命令︰

wusa.exe d:\934307\Windows6.0-KB934307-x86.msu /quiet

注意當您使用這個參數時,Microsoft 軟體授權合約不會出現。

/norestart
Wusa.exe 可防止重新啟動電腦。如果/quiet參數不存在,則只會切換控制會被忽略。如果您執行 Wusa.exe,以及這兩個參數,您必須手動重新啟動作業系統安裝完成後如果安裝要求您重新啟動電腦。

比方說,如果 Windows6.0-KB934307-x86.msu 檔案位於 D:\934307 資料夾中,請在安裝更新套件的命令提示字元中輸入下列命令︰

wusa.exe D:\934307\Windows6.0-KB934307-x86.msu /quiet /norestart
/uninstall
解除安裝指定的套件或 KB 數。

/kb
指定要使用的 KB 數字來解除安裝的封裝。可以只與/ 解除安裝的參數傳遞。

/extract
Wusa.exe 解壓縮套件的目的地資料夾的內容。

/warnrestart
當這個參數與/quiet參數結合 Wusa.exe 提示您之前開始重新安裝和解除安裝作業。

/forcerestart
當這個參數結合使用/quiet參數,Wusa.exe 強制關閉應用程式,然後重新啟動電腦。


注意可以使用與 Windows 7 Windows 8 OEM 預先安裝套件 (OPK) Windows 自動化安裝套件 (AIK) DISM.exe /Add-Package選項,將.msu 檔案安裝至離線映像。如需詳細資訊,請移至下列的 Microsoft TechNet 網站︰


若要檢視 Windows 更新的獨立安裝程式的事件記錄檔,請依照下列步驟執行︰
1.      按一下 [開始
windows icon
 開始搜尋] 方塊中,輸入事件檢視器] ,然後按一下 [程式集] 清單中的 [事件檢視器] 。在 Windows 8 Windows Server 2012,在 [開始] 畫面中,輸入事件檢視器] 按一下 [設定],然後按一下 [設定] 下的 [檢視事件記錄檔


Notice icon
 提示輸入系統管理員密碼或確認的提示,請輸入密碼,或按一下 [繼續]

2.       在事件檢視器,請展開Windows 記錄檔時,,,然後按一下 [安裝程式

安裝事件會顯示在中間窗格中。

3.       [動作] 窗格中,按一下 [篩選目前的記錄

4.       [事件來源] 清單中,按一下以選取WUSA ] 核取方塊,然後按一下[確定]
參考


如需有關 Windows 更新代理程式 API 的詳細資訊,請前往下列 Microsoft 網站︰















沒有留言:

張貼留言