...den Programme-Pfad ermitteln?
Autor: Thomas Stutz
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;
printed from
www.swissdelphicenter.ch
developers knowledge base