Don't use the function GetHomePath - get the user program data directory

Recommended for you: Get network issues from WhatsUp Gold. Not end users.
uses System.IOUtils;

procedure TForm1.FormCreate(Sender: TObject);
  S: string;
  { Results are consistent with three methods: C:\Users\wy\AppData\Roaming }
  S := GetHomePath;                       // SysUtils, Can cross platform and simple, the use of SHGetFolderPath in the Windows
  S := TPath.GetHomePath;                 // System.IOUtils
  S := GetEnvironmentVariable('APPDATA'); // Always use this
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download

Posted by Ann at January 11, 2014 - 11:16 PM