Delphi 获取系统启动文件夹路径


本文整理自网络,侵删。

 
 uses  ShlObj, ShellAPI;

function GetAutoRunFilePath(): String;
var
  fileName, pathStartUp: String;
  path: array [0 .. 255] of Char;
begin
  if SHGetSpecialFolderPath(0, @path[0], CSIDL_STARTUP, true) then
    pathStartUp := String(path);

  Result := pathStartUp + PathDelim + fileName;
end;


procedure TForm1.FormCreate(Sender: TObject);
begin

form1.Caption:=GetAutoRunFilePath;
end;

相关阅读 >>

Delphi xe android platform uses-permission[2] androidmanifest.xml 配置

Delphi 判断tcp端口是否被占用的方法

Delphi 获取计算机名和用户名

Delphi 在unicodestring中使用utf-8字符串

Delphi xe5实现datetimetounix/unixtodatetime的一点小改进

Delphi xe android/ios 实现图片放大缩小的两种方法

Delphi 延时的4种方法

Delphi 新版内存表 fdmemtable

Delphi 建立快捷方式的函数: createshortcut

Delphi postmessage 虚拟按键

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...