2009-08-16

Delphi抓取系統桌面路徑

uses Registry;

Function _GetDeskTopDir: String;
var root: TRegistry;
begin
 root:= TRegistry.Create;
 root .OpenKey('SOFTWARE\MICROSOFT\WINDOWS\CURRENTVERSION\EXPLORER\SHELL FOLDERS', FALSE);
 Result := root.ReadString('DESKTOP');
 Result := UpperCase(Result);
 R.Free;
end;
張貼留言