.... and just append "\Desktop" to itThis also does Kaboom for non-English versions of Window$ ;)
program Project1; Uses Sysutils; begin writeln(GetUserDir); end.
.... and just append "\Desktop" to it
Hmm, thats interesting, I do this -
{$ifdef WINDOWS} TheHomeDir := appendPathDelim(GetEnvironmentVariableUTF8('HOMEPATH'));
And assume Desktop is immediately below that. Is that not a safe practice ?
Davo
Hmm, thats interesting, I do this -No it's not. Exactly because of the reasons Remy described.
{$ifdef WINDOWS} TheHomeDir := appendPathDelim(GetEnvironmentVariableUTF8('HOMEPATH'));
And assume Desktop is immediately below that. Is that not a safe practice ?
Davo