Dim colUpdate, oUpdate, iTHCount, oWU Dim strBuilder As New System.Text.StringBuilder ' creating com object oWU = CreateObject("Microsoft.Update.Searcher") iTHCount = oWU.GetTotalHistoryCount If iTHCount > 0 Then Dim dr As DataRow colUpdate = oWU.QueryHistory(0, iTHCount) For Each oUpdate In colUpdate If oUpdate.ResultCode = 2 Then ' only succeeded updates dr = dtUpdates.NewRow() dr("Name") = oUpdate.Title.ToString.Trim dtUpdates.Rows.Add(dr) End If Next End If
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)