Delphi Tips&Tricks News   Tips   .NET Software   VCL Software   Search   Contacts
Ultimate Pack Special Offer!


Share this page

Follow us
LinkedIn Blogspot Twitter Facebook

Related products
Ultimate Pack  hot!
iGrid Plotter  new!
Image Editor
Runtime Fusion
Form Designer
Object Inspector
Print Suite Pro
Commented Image
Delphi Toys
WinDowse
Delphi Bonus
TMS Scripter Studio
Form Designer VB
Form Designer .NET
Print Suite .NET
Gradient Controls .NET  new!

Related links
Win32.hlp online version
MegaDetailed.NET
Delphi to C#

Special
Free Software Promotion
Offers for Resellers

Hobby projects
cdtrrracks.com
books.storrre.com
in3steps.com
sovietphillumeny.com

Show list of installed programs - System - Tips & Tricks - Greatis Delphi Pages

The list of installed programs you can find in registry in HKEY_LOCAL_MACHINE using Software\Microsoft\Windows\CurrentVersion\Uninstall path. We will display programs, which contains DispalayName parameter.


uses Registry;
...
procedure TForm1.Button1Click(Sender: TObject);
var
  MyList: TStringList;
  MyRegistry: TRegistry;
  i: Integer;
  Str: string;
begin
  MyRegistry:=TRegistry.Create;
  MyList:=TStringList.Create;
  with MyRegistry do
  begin
    RootKey:=HKEY_LOCAL_MACHINE;
    if OpenKey(
      'Software\Microsoft\Windows\CurrentVersion\Uninstall', 
      False)=True then GetKeyNames(MyList);
    CloseKey;

    for i:=0 to MyList.Count-1 do
    begin
      RootKey:=HKEY_LOCAL_MACHINE;
      OpenKey(
        'Software\Microsoft\Windows\CurrentVersion\Uninstall\'+
        MyList[i], 
        False);
      Str:=ReadString('DisplayName');
      if Str<>'' then
        Memo1.Lines.Add(ReadString('DisplayName'));
      CloseKey;
    end;
  end; 
end;
For more
Win32 programmer's reference

Download source