Kod: Tümünü seç
procedure TForm1.Button1Click(Sender: TObject);
var
updateSession : OleVariant;
updateSearcher : OleVariant;
updateSearchResult : OleVariant;
updateEntry : OleVariant;
UpdateCollection : OleVariant;
oEnum : IEnumvariant;
iValue : LongWord;
begin
updateSession:= CreateOleObject('Microsoft.Update.Session');
updateSearcher := updateSession.CreateUpdateSearcher;
updateSearchResult:= updateSearcher.Search(Format('IsInstalled = 0 and Type=%s',[QuotedStr('Software')]));
UpdateCollection := updateSearchResult.Updates;
oEnum := IUnknown(UpdateCollection._NewEnum) as IEnumVariant;
while oEnum.Next(1, updateEntry, iValue) = 0 do
begin
Memo1.Lines.Add(updateEntry.Title); // Guncellemeleri memo'ya ekler
updateEntry:=Unassigned;
end;
end;