WUA API unable to uninstall updates

孤街醉人 提交于 2019-12-22 12:38:43

问题


I have encountered an issue when using Windows Update Agent (WUA) API.

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?


回答1:


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.

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.)



来源:https://stackoverflow.com/questions/38936202/wua-api-unable-to-uninstall-updates

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!