问题描述
使用Windows Update代理(WUA)API时遇到问题。
I have encountered an issue when using Windows Update Agent (WUA) API.
每当我尝试使用 IUpdateInstaller卸载更新时。 :=正确;
我得到
IUpdateInstaller.BeginUninstall(... WU_E_UNINSTALL_NOT_ALLOWED
(由于请求确实无法卸载更新不是源自WSUS服务器)。这是否意味着我无法使用WUA API卸载更新?在那种情况下,为什么那里存在BeginUninstall / Uninstall方法?
Whenever I try to uninstall an update using IUpdateInstaller.IsForced := True;IUpdateInstaller.BeginUninstall(...
i'm getting WU_E_UNINSTALL_NOT_ALLOWED
(The update could not be uninstalled because the request did not originate from a WSUS server). Does it mean that I can't use WUA API to uninstall updates? In that case, why are BeginUninstall/Uninstall methods there?
推荐答案
根据(还有)WUA API仅可用于卸载由WSUS服务器安装的更新。
According to Hey, Scripting Guy! How Can I Remove a Microsoft Update? (and also here) the WUA API can only be used to uninstall updates that were installed by a WSUS server.
您也许可以改用DISM,例如,请参见和。 (请注意,Windows更新在DISM术语中称为程序包。)
You might be able to use DISM instead, e.g., see here and here. (Note that Windows updates are refered to as "packages" in DISM terminology.)
这篇关于WUA API无法卸载更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!