Adding item in Help for Environment variables

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Adding item in Help for Environment variables

Post by *petermad »

In the Help for Enviromnt Varables under:
4. Pseudo environment variables from parameters of the function SHGetKnownFolderPath

I suggest to add: OneDrive

%$Onedrive% does the same as %$SkyDrive% under Windows 8 and 10 but %$Onedrive% also works under Windows 7, which %$SkyDrive% does not.

Note, it is only OneDrive that works - OneDriveDocuments for example does not work as replacement for SkyDriveDocuments.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Actually %$Onedrive% doesn't exist! Therefore TC also checks %Onedrive% and finds it! It's a regular environment variable you can see with "set" command in cmd.exe.
Author of Total Commander
https://www.ghisler.com
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

Aha - then the question is whether it should be added to the list in the help or not?

%APPDATA% and %$APPDATA" is a similar example.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, they are different! When you specify %APPDATA%, TC looks in the environment variable. When you specify %$APPDATA", TC calls ShGetSpecialFolderLocation with parameter CSIDL_APPDATA, and then SHGetPathFromIdList to get the actual directory name. For the second list of variables, TC calls SHGetKnownFolderPath.
Author of Total Commander
https://www.ghisler.com
Post Reply