【发布时间】:2019-01-05 03:09:32
【问题描述】:
使用Windows Update Agent API,可以列出Windows 更新。例如:
Set UpdateSession = CreateObject("Microsoft.Update.Session")
Set UpdateSearcher = UpdateSession.CreateUpdateSearcher()
Set SearchResult = UpdateSearcher.Search("IsInstalled=0 OR IsInstalled=1")
Set Updates = SearchResult.Updates
For I = 0 to SearchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> " & update.Title
Next
由于上面我查询已安装和未安装的更新,我假设结果列出了我的当前 Windows 版本/构建的所有可用更新。对吗?
我现在的意思是:我也可以查询其他版本吗?
例如,列出来自 Windows 10 系统的 Windows Server 2016 更新。
这个想法是轻松配置开发人员 Windows 虚拟机,采用 ISO 和最新的累积更新。
【问题讨论】:
标签: wuapi