Windows update downloader.Download() fail

拟墨画扇 提交于 2019-12-06 14:55:49

You are receiving this error because the Windows Updater API requires elevated priveleges. Launching your script in an elevated command prompt should solve the issue.

As a side note, you should make sure that you are connected to the internet, the Windows Update service is enabled, and that there are no pending update installations (i.e. waiting to install at shutdown). These things will also cause errors.

[edit]

You should be able to retrieve the status from inside the the library. The Download method returns a status code. Assigning its result to a variable may prevent your script from bombing out. If not, try using On Error Goto Next to get around it. You can find the various result codes and error codes below.

Windows Update Agent Result Codes

WUA Networking Error Codes

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