this slowpoke moves

Ermittle Installierte Programme

uses Registry

procedure TForm1.Button1Click(Sender: TObject);
var
  list : TlistItem;
  reg : Tregistry;
  subcle : TStringList;
  i : Integer;
  root, displayn, unistr : string;
begin
  liste.Items.Clear;
  root := '\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\';
  reg := tregistry.Create;
  reg.RootKey := HKEY_LOCAL_MACHINE;
  reg.OpenKey(root,False);

  subcle := TStringList.create;

  reg.GetKeyNames(subcle);
  reg.CloseKey;

  For i:=0 to subcle.count-1 do
  begin
    reg.OpenKey(root+subcle.Strings[i],False);
    displayn := reg.ReadString('DisplayName');
    unistr := reg.ReadString('UninstallString');
    reg.closekey;
      if displayn << '' then
        begin
          list := liste.Items.Add;
          list.caption := displayn;
          list.SubItems.Add(unistr);
        end;
  end;
  reg.Free;
end;

Keine Kommentare:

Kommentar veröffentlichen

Beliebte Posts

Translate