How do I get a list of installed updates and hotfixes?

后端 未结 5 1799
盖世英雄少女心
盖世英雄少女心 2020-11-30 05:16

A list of every update and hotfix that has been installed on my computer, coming from either Microsoft Windows Update or from the knowledge base. I need the ID of each in th

5条回答
  •  感情败类
    2020-11-30 05:31

    You can use IUpdateSession3::QueryHistory Method.
    The properties of the returned entries are described at http://msdn.microsoft.com/en-us/library/aa386400(VS.85).aspx

    Set updateSearch = CreateObject("Microsoft.Update.Session").CreateUpdateSearcher
    Set updateHistory = updateSearch.QueryHistory(1, updateSearch.GetTotalHistoryCount)
    
    For Each updateEntry in updateHistory
      Wscript.Echo "Title: " & updateEntry.Title
      Wscript.Echo "application ID: " & updateEntry.ClientApplicationID
      Wscript.Echo " --"
    Next

    edit: also take a look at http://msdn.microsoft.com/en-us/library/aa387287%28VS.85%29.aspx

提交回复
热议问题