Shell icon indicating copy to clipboard operation
Shell copied to clipboard

sys.temp doesn't follow system env variable

Open Protator906 opened this issue 1 year ago • 3 comments

I just noticed that, while cmd=user.temp properly opens the location specified in the user environment variables, cmd=sys.temp leads to the same location and ignores the system env variables.

Protator906 avatar Sep 02 '24 00:09 Protator906

user.temp and sys.temp do not get the result from environment variables (the results come from windows: https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid)

and yes, they point to the same folder (it is the same for user.appdata and sys.appdata)

RubicBG avatar Sep 02 '24 08:09 RubicBG

user.temp and sys.temp do not get the result from environment variables (the results come from windows: https://learn.microsoft.com/en-us/windows/win32/shell/knownfolderid)

Windows Environment Variables - I'm not talking about anything within Shell. So that link is kinda useless; afaik env vars don't have a static CSIDs. And 'user.temp' does what it's supposed to do, according to the env var I've set ... in Windows ... it points to my ram disk.

and yes, they point to the same folder (it is the same for user.appdata and sys.appdata)

Then my question is 'why?'. ('Sys.temp' is a thing, unlike the strange example you chose. There's 'user.appdata' and 'user.localappdata'. I'm surprised 'sys.appdata' even resolves.)

Protator906 avatar Sep 02 '24 09:09 Protator906

why? - I don't know, but if I had to guess it's a "historical result": function created once in one version are not removed in subsequent version to avoid a syntax conflict if users already use that function - it was created first with sys.*. it is then created for the user.*. And another time something like this happened

RubicBG avatar Sep 02 '24 16:09 RubicBG