UWF_Servicing.UpdateWindows

呼叫 Windows Update,以下載並安裝執行 Windows 10 企業版 之裝置的重要和安全性更新。

語法

UInt32 UpdateWindows(
    [out] UInt32 UpdateStatus
);

參數

UpdateStatus
[out] 根據下表,包含 Windows Update 作業狀態的整數:

UpdateStatus 描述
0 成功。
3010 需要重新啟動。
任何其他值。 一般錯誤。

傳回值

傳回 HRESULT 值,指出 WMI 狀態WMI 錯誤

備註

此方法是用來作為服務腳本的一部分。 如需詳細資訊,請參閱 服務受UWF保護的裝置

此方法不會停用或啟用整合寫入篩選器 (UWF)。 如果您在啟用 UWF 時呼叫此方法,裝置重新啟動時可能會遺失更新。

需求

Windows 版本 支援
Windows Home No
Windows 專業版 No
Windows 企業版 Yes
Windows 教育版 Yes
Windows IoT 企業版 Yes