uses System.IOUtils;
procedure TForm1.FormCreate(Sender: TObject);
var
S: string;
begin
{ 三種方法結果一致: C:\Users\wy\AppData\Roaming }
S := GetHomePath; // SysUtils, 能跨平台且簡單, 在 Windows 下使用 SHGetFolderPath 完成
S := TPath.GetHomePath; // System.IOUtils
S := GetEnvironmentVariable('APPDATA'); // 以前一直用這個
end;
