Behavior of: %COMMANDER_INI%\..

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
krasusczak
Senior Member
Senior Member
Posts: 282
Joined: 2011-09-23, 10:35 UTC

Behavior of: %COMMANDER_INI%\..

Post by *krasusczak »

Hello all,

I was trying to modify a little extended English menu ini: wcmd_win7x86_1_eng.ini for opening a new instance of TC from my special config location but I found something strange

So here is what I'm trying to use there:
[em_ext_newcommander1]
cmd=*%COMMANDER_EXE% /N /P /A /i="%COMMANDER_INI%" /f="%COMMANDER_INI%\..\wcx_ftp.ini"
param=%Z%X %P%N* %T%M*
menu=Open New Instance of Total Commander as Administrator
button=%COMMANDER_EXE%
I have my configuration dir with all my cfg's here: c:\Program Files (x86)\totalcmd\config\

But new instance started via this has this values:
Settings files:
c:\Program Files (x86)\totalcmd\config\wincmd.ini
c:\Program Files (x86)\totalcmd\config\wincmd.ini\..\wcx_ftp.ini
It shouldn't have??:
c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini

I found many topics that if I will use %COMMANDER_INI%\.. it should be resolved as main config directory, am I missing something here?

Any advice appreciated, thanks!
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6509
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Behavior of: %COMMANDER_INI%\..

Post by *Horst.Epp »

%COMMANDER_INI% is not a directory.
It's just the full path of the current ini file.
You can use %COMMANDER_PATH% as base for your other ini files.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3593)
TC 11.03 x64 / x86
Everything 1.5.0.1375a (x64), Everything Toolbar 1.3.3, Listary Pro 6.3.0.78
QAP 11.6.3.3 x64
User avatar
petermad
Power Member
Power Member
Posts: 14830
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of: %COMMANDER_INI%\..

Post by *petermad »

2krasusczak

I tested your scenario. event though "About Total Commander" shows: c:\Program Files (x86)\totalcmd\config\wincmd.ini\..\wcx_ftp.ini it actually works - try and oprn the "Connect to FTP server" - it will open c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini and changes are written to c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini - so it must be a bug in the "About Total Commander" dialog.

Also try - after you have opened the New Instance of Total Commander as Administrator - to run notepad "%COMMANDER_INI%\..\wcx_ftp.ini" it will open c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
white
Power Member
Power Member
Posts: 4636
Joined: 2003-11-19, 08:16 UTC
Location: Netherlands

Re: Behavior of: %COMMANDER_INI%\..

Post by *white »

petermad wrote: 2023-11-09, 11:51 UTC I tested your scenario. event though "About Total Commander" shows: c:\Program Files (x86)\totalcmd\config\wincmd.ini\..\wcx_ftp.ini it actually works - try and oprn the "Connect to FTP server" - it will open c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini and changes are written to c:\Program Files (x86)\totalcmd\config\wcx_ftp.ini - so it must be a bug in the "About Total Commander" dialog.
It's a feature of Windows that relative paths like this work. It has nothing to do with TC. Why would you call it a bug just because canonicalization is not done?
JOUBE
Power Member
Power Member
Posts: 1485
Joined: 2004-07-08, 08:58 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *JOUBE »

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

Re: Behavior of: %COMMANDER_INI%\..

Post by *petermad »

2white
Why would you call it a bug
OK - a missing feature then.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
krasusczak
Senior Member
Senior Member
Posts: 282
Joined: 2011-09-23, 10:35 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *krasusczak »

2petermad
Good catch!, when I was testing this by mistake my test file had only old connections without any ftp config so I didn't se this haha

It looks for me kind of visual bug/enhancement, which maybe could be changed at least for About window?
2ghisler(Author): what do you think about this?
Last edited by krasusczak on 2023-11-10, 10:24 UTC, edited 2 times in total.
User avatar
petermad
Power Member
Power Member
Posts: 14830
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of: %COMMANDER_INI%\..

Post by *petermad »

what do you think about this
I think that as long as TC does not have a %COMMANDER_INI_PATH% variable ( viewtopic.php?t=78954 ) it would be pertinent that TC would dessolve %COMMANDER_INi%\..\ correctly in the About dialog.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14830
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Behavior of: %COMMANDER_INI%\..

Post by *petermad »

Moderator message from: petermad » 2023-11-11, 19:56 UTC

Moved 8 posts to "[Tc11] Suggestion: COMMANDER_INI_PATH" in "TC suggestions (English)"
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Profane0360
Junior Member
Junior Member
Posts: 21
Joined: 2023-08-31, 20:08 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *Profane0360 »

My two cents here, if I may. I have a similar issue myself.

I start TC with my own CMD file, where I set up the path with a few things that I need inside TC, as, for instance, LaTeX, Perl, C, Java paths. Then I do a start with the complete TC command line pointing to the two INI files and the drives that I want visible as I start.

My alternative to this CMD would be a LNK file with the INI files parameters and the Autorun plugin. But I prefer the CMD file.

With a CMD file I am actually tempted to have my own set of predefined variables, pointing to all the relevant folders. They can be used consistently in the TC universe, as they are created before starting TC and visible inside TC.

%TCMD_ROOT%
%TCMD_BIN%
%TCMD_INI%
%TCMD_PLUGINS%
%TCMD_TOOLS%

Why would this approach be a bad idea? What disadvantages does it have?
#155067 Personal licence (March 2007)
User avatar
Stefan2
Power Member
Power Member
Posts: 4169
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Behavior of: %COMMANDER_INI%\..

Post by *Stefan2 »

Profane0360 wrote: 2023-11-16, 10:10 UTC
%TCMD_ROOT%
%TCMD_BIN%
%TCMD_INI%
%TCMD_PLUGINS%
%TCMD_TOOLS%

Why would this approach be a bad idea? What disadvantages does it have?

Maybe because the storage space for Env Vars is limited.
So we all should only take as much as we really need.

The user can take much more if he want on a single system, but the developer
must keep in mind that all applications have to share the same storage space.

Also see "the maximum length of an environment variable" at https://devblogs.microsoft.com/oldnewthing/20100203-00/?p=15083


 
Profane0360
Junior Member
Junior Member
Posts: 21
Joined: 2023-08-31, 20:08 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *Profane0360 »

Stefan2 wrote: 2023-11-16, 11:17 UTC The user can take much more if he want on a single system, but the developer must keep in mind that all applications have to share the same storage space.
Yes, indeed. This is exactly my point. Instead of having Mr Ghisler, the developer, preset all these variables and add more, I, the user, may organize my own set of variables on my own system the way I see fit. Thank you indeed for your input.
#155067 Personal licence (March 2007)
krasusczak
Senior Member
Senior Member
Posts: 282
Joined: 2011-09-23, 10:35 UTC

Re: Behavior of: %COMMANDER_INI%\..

Post by *krasusczak »

From my perspective it would be ok to just fix this graphical "inconvenience" without playing with env var changes :)
Post Reply