Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing LocalApplicationData Equivalent in Delphi

Tags:

Using Delphi, how do I access the equivalent of .NET's System.Environment.SpecialFolder.LocalApplicationData variable (which works on any version of Windows)? I assumed I could just do:

dir := GetEnvironmentVariable('LOCALAPPDATA');

This works on Vista but XP doesn't seem to set that environment variable by default at least on my test machine.


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!