Files Delphi

uses
Registry;
function GetProgramFilesDir: string;
var
reg: TRegistry;
begin
reg := TRegistry.Create;
try
reg.RootKey := HKEY_LOCAL_MACHINE;
reg.OpenKey('SOFTWARE\Microsoft\Windows\CurrentVersion', False);
Result := reg.ReadString('ProgramFilesDir');
finally
reg.Free;
end;
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
// Shows something like c:\Program files
// zeigt "c:\Programme" (oder ähnlich)
ShowMessage(GetProgramFilesDir);
end;