delphi如何获取%APPDATA%全路径
展开全部
GetEnvironmentVariable
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
楼上正解 SysUtils单元 有现成函数可调
GetEnvironmentVariable
Returns the value of an environment variable.
Delphi syntax:
GetEnvironmentVariable(Name: string): string;
C++ syntax:
extern PACKAGE AnsiString __fastcall GetEnvironmentVariable(const AnsiString Name);
Description
GetEnvironmentVariable returns the value of the environment variable indicated by Name.
举例
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(GetEnvironmentVariable('APPDATA'));
end;
GetEnvironmentVariable
Returns the value of an environment variable.
Delphi syntax:
GetEnvironmentVariable(Name: string): string;
C++ syntax:
extern PACKAGE AnsiString __fastcall GetEnvironmentVariable(const AnsiString Name);
Description
GetEnvironmentVariable returns the value of the environment variable indicated by Name.
举例
procedure TForm1.Button1Click(Sender: TObject);
begin
ShowMessage(GetEnvironmentVariable('APPDATA'));
end;
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询