AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

Installed Software function

Ein Thema von value is NULL · begonnen am 24. Mai 2011 · letzter Beitrag vom 24. Mai 2011
 
Benutzerbild von Deep-Sea
Deep-Sea

Registriert seit: 17. Jan 2007
907 Beiträge
 
Delphi XE2 Professional
 
#13

AW: Installed Software function

  Alt 24. Mai 2011, 11:13
War ja klar, dass ich was vergessen musste
Delphi-Quellcode:
procedure GetUninstallList(AList: TStrings);
const
  UNINSTALL_PATH = 'Software\Microsoft\Windows\CurrentVersion\Uninstall\';
  DISPLAY_NAME = 'DisplayName';
var
  LIndex: Integer;
begin
  If Assigned(AList) then
  begin
    AList.BeginUpdate;
    try
      AList.Clear;
      With TRegistry.Create do
      try
        RootKey := HKEY_LOCAL_MACHINE;
        If KeyExists(UNINSTALL_PATH) and OpenKeyReadOnly(UNINSTALL_PATH) then
        begin
          GetKeyNames(AList);
          CloseKey;
        end;
        LIndex := 0;
        While LIndex < AList.Count do
        begin
          If not (OpenKeyReadOnly(UNINSTALL_PATH + AList[LIndex]) and
            ValueExists(DISPLAY_NAME)) then AList.Delete(LIndex)
          else begin
            AList[LIndex] := ReadString(DISPLAY_NAME);
            Inc(LIndex);
          end;
          CloseKey;
        end;
      finally
        Free;
      end;
    finally
      AList.EndUpdate;
    end;
  end;
end;
Besser so?
Chris
Die Erfahrung ist ein strenger Schulmeister: Sie prüft uns, bevor sie uns lehrt.
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:44 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz