Agree - that should not be so%COMMANDER_INI_PATH% = D:\
%COMMANDER_INI_PATH%\file.ext = D:\\file.ext

Moderators: Hacker, petermad, Stefan2, white
Agree - that should not be so%COMMANDER_INI_PATH% = D:\
%COMMANDER_INI_PATH%\file.ext = D:\\file.ext
Not excactly.Btw, Total Commander removes duplicate backslashes from the above situation when replacing environment variables.
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C echo %COMMANDER_INI_PATH%\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
echo %|COMMANDER_INI_PATH|\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
Code: Select all
TOTALCMD#BAR#DATA
%COMSPEC% /C
echo %%COMMANDER_INI_PATH%%\file && pause
%COMMANDER_EXE%,2
Test %COMMANDER_INI_PATH%
Wrong/not wrong: doesn’t matter. It's about practice: and D: is better in this case as D:\
Code: Select all
C:\Users\Public>cd d:\
C:\Users\Public>d:\
"d:\" is not an internal or external command, executable program, or batch file.
C:\Users\Public>d:
d:\>c:
C:\Users\Public>cd d:
d:\
C:\Users\Public>
You can add this to the description in the help and explicitly point out the “technical” part.ghisler(Author) wrote: 2024-01-25, 08:47 UTC OK, I have tested now how %COMMANDER_PATH% handles it: It doesn't append a backslash in the root. So while it's technically incorrect (D: is just the drive and D:\ the drive root) I will change it to that also in %COMMANDER_INI_PATH%.
I'm trying to read the value for COMMANDER_INI_PATH from the registry in these locations:
but they always come up empty, but when I do a simple echo %COMMANDER_INI_PATH% on a command line it is displayed correctly."HKEY_CURRENT_USER\Environment"
"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
Note. If a user uses a truly portable setup there also might be no Software\Ghisler registry entries at all, and even if some data is there it might not reflect actual locations when a user has several copies of the TotalCommander, and/or relocates TotalCommander after the primary installation.Machine: The environment variable is stored or retrieved from the HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment key in the Windows operating system registry.
User: The environment variable is stored or retrieved from the HKEY_CURRENT_USER\Environment key in the Windows operating system registry.
*Process: The environment variable is stored or retrieved from the environment block associated with the current process.
Moderator message from: petermad » 2024-01-30, 14:18 UTC
? Maybe it's a Windows/Greta Thunberg joke understandable only for Scandinavians?