如何获得windows的My do cuments的路径?(50分)

  • 主题发起人 主题发起人 terry_lzs
  • 开始时间 开始时间
T

terry_lzs

Unregistered / Unconfirmed
GUEST, unregistred user!
查注册表:
HKEY_CURRENT_USER/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders
Personal
函数:
function GetMyDocuments: String;
var
R: TRegistry;
begin
R := TRegistry.Create;
R.RootKey := HKEY_CURRENT_USER;
R.CreateKey('/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders');
R.OpenKey('/Software/Microsoft/Windows/CurrentVersion/Explorer/Shell Folders', False);
Result := R.ReadString('Personal');
R.Free;
end;
 
接受答案了.
 
后退
顶部