List Update History

Displays all the updates that have been installed on a computer.

4.2 Star
Add to favorites
Windows Update
E-mail Twitter Digg Facebook
  • Shouldn't the fourth line contain (0, intHistoryCount), instead of (1, intHistoryCount)?
    2 Posts | Last post November 08, 2011
    • About 2/3 of the way down the page at the following note appears:
      Yet Another Note. History entries are stored in inverse order: the last update event to take place is item 0, the next-to-the-last update event is item 1, and so on. If you only want to see information about the last update event, use this line of code:
      Set colHistory = objSearcher.QueryHistory(0, 1)
      This statement conflicts with the fourth line of the script provided here. The above note indicates that the update collection is zero-indexed, so, if one were to use the code supplied in this article, (1, intHistoryCount), the most recent update would always be missing from the collection. Right?
    • That point seems to be correct. If I run the Query with 
      "Set colHistory = objSearcher.QueryHistory(0, intHistoryCount)"
      I get one update more back. So may be this should be changeg on the Example Code.