New Built-in Variable for appdata local

Propose new features and changes
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

New Built-in Variable for appdata local

18 Sep 2015, 00:48

New Built-in Variable for AppData Local

A_LocalAppData or A_AppDataLocal

Common folder variables (%LOCALAPPDATA%)

Code: Select all

Windows XP and Windows 2000
C:\Documents and Settings\ <user name>\Local Settings\Application Data


Windows 10, Windows 8.1, Windows 7, and Windows Vista
C:\Users\ <user name>\AppData\Local

Example:

Code: Select all

MsgBox % A_AppData              ; ==>  C:\Users\Username\AppData\Roaming
MsgBox % A_AppDataCommon        ; ==>  C:\ProgramData

MsgBox % A_AppDataLocal         ; ==>  C:\Users\Username\AppData\Local            *I prefer this one
MsgBox % A_LocalAppData         ; ==>  C:\Users\Username\AppData\Local
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: New Built-in Variable for appdata local

18 Sep 2015, 01:17

I personally would prefer that there were less built-in variables that directly correspond to environment variables, not more. However, I think %LOCALAPPDATA% doesn't exist on Windows XP.
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: New Built-in Variable for appdata local

18 Sep 2015, 02:47

Do you plan to remove some built-in variables? If so, which ones?
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
User avatar
jNizM
Posts: 3183
Joined: 30 Sep 2013, 01:33
Contact:

Re: New Built-in Variable for appdata local

27 Nov 2019, 09:05

Since v2 will drop the support for XP and below, how about now?
A_AppDataLocal -> CSIDL_LOCAL_APPDATA (C:\Users\Username\AppData\Local)

Many programs and settings are stored under LocalAppData.

Ref: https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables#variables-that-are-recognized-only-in-the-user-context
[AHK] v2.0.5 | [WIN] 11 Pro (Version 22H2) | [GitHub] Profile
lexikos
Posts: 9583
Joined: 30 Sep 2013, 04:07
Contact:

Re: New Built-in Variable for appdata local

07 Dec 2019, 18:44

I have it on one of my TODO lists.

I think you missed my point, though. XP doesn't have the environment variable, so having a built-in variable which uses the appropriate API (which XP does have) would be of use there. Without XP support, you can always use EnvGet("LOCALAPPDATA").
Industry
Posts: 19
Joined: 26 Apr 2017, 14:50

Re: New Built-in Variable for appdata local

16 Sep 2021, 12:56

Hold up - this is from 2015 and it still hasn't been implemented?

Return to “Wish List”

Who is online

Users browsing this forum: No registered users and 21 guests