共用方式為


UWF_Servicing.UpdateWindows

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

語法

UInt32 UpdateWindows(
    [out] UInt32 UpdateStatus
);

參數

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

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

傳回值

傳回指出 WMI 狀態WMI 錯誤的 HRESULT 值。

備註

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

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

需求

Windows 版本 支援
Windows 首頁
Windows 專業版
Windows 企業版
Windows 教育版
Windows IoT 企業版