Configuring Total Commander for terminal server environment

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Configuring Total Commander for terminal server environment

Post by *X-Byte »

Environment:
Windows 2012R2 Server with Remote Desktop Services installed
Total Commander 9.0a (simply extracted, not installed)

Goal:
- Global configuration for Total Commander, defining basic settings, plugins, resolution settings
- User specific configuration holding all history entries as well as wcx_ftp.ini and tccloud.ini

In order to achieve that, I've made the following modifications:
WinCmd.ini is placed in Total Commander application directory
- UseIniInProgramDir=5 - WinCmd.ini in TC directory will be used, containing all global settings. I was hoping wcx_ftp.ini would be looked for in the path of AlternateUserIni.
- AlternateUserIni=%$APPDATA%\Ghisler\User.ini - All user specific settings go here, history etc.

Issues:
User specific configurations fails to be written if the folder defined in AlternateUserIni doesn't exist yet. TC doesn't seem to try to create it but pops up an error message, that the file cannot be written to. After manually creating the folder it works. But that's not something I want to do for every (new) user on the system.

The files holding user specific connection settings wcx_ftp.ini and tccloud.ini are still being looked for in the TC application directory.

Am I missing something or is that scenario not supported by TC?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2X-Byte
With UseIniInProgramDir=5 TC will look in the Windows Registry for the location of wcx_ftp.ini - that is in:

HKEY_CURRENT_USER\Software\Ghisler\Total Commander\FtpIniName
or
HKEY_LOCAL_MACHINE\Software\Ghisler\Total Commander\FtpIniName

If the HKEY_CURRENT_USER key is not found, the HKEY_LOCAL_MACHIN will be used - so this can be used as a global setting for all users pointing to %$APPDATA%\Ghisler\ (I haven't tested whether environment variable is supported, but I suppose it is)

See: https://www.ghisler.ch/wiki/index.php?title=Finding_the_paths_of_Total_Commander_files
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
X-Byte
Member
Member
Posts: 173
Joined: 2004-11-29, 09:34 UTC
Location: Hessen, Germany

Post by *X-Byte »

2petermad
Thanks for that hint, unfortunately it doesn't work.
I've played around with the UseIniInProgramDir combinations and I think something is broken as soon as I add 4, resulting in 5 for my desired case.
Adding 4 means ignore registry settings, which results in the set FtpIniName in HKLM being ignored. Even worse, TC assumes C:\Windows\wcx_ftp.ini as the ftp ini file, even though I'm running on Windows 10 (all testing is done on my client system).
I also tried UseIniInProgramDir=4 which makes TC want to use C:\Windows for BOTH, wincmd.ini and wcx_ftp.ini even though according to the wiki, %AppData%\Ghisler should be the default if nothing is defined.
So I have to fall back to UseIniInProgramDir=1, risking that a possibly existing registry IniFileName in the many HKCUs messes things up.

Even with UseIniInProgramDir=1 it's not working if the defined path for AlternateUserIni does not yet exist in the user profile path. TC doesn't even bother creating the path.

As much as I wish to deploy TC on the terminal servers, the ini handling for this scenario is currently way to buggy for production purposes.
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2X-Byte
Here's a solution that for me works as you describe:

Delete whatever is in [HKEY_CURRENT_USER\Software\Ghisler\Total Commander]

Install this .reg file:

Code: Select all

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\Software\Ghisler\Total Commander]
"IniFileName"=".\\wincmd.ini"
"FtpIniName"="%APPDATA%\\Ghisler\\wcx_ftp.ini"
EDIT - NOTE: you have to install this .reg file from both a 64bit regedit.exe and a 32bit regedit.exe (double-click the .reg file from both a 64bit and a 32bit instance of TC) if you want it to work for both 64- and 32-bit instance of TC.

Use this wincmd.ini file in the TC program directory:

Code: Select all

[Configuration]
AlternateUserIni=%APPDATA%\Ghisler\User.ini
You don't even need a UseIniInProgramDir line in wincmd.ini, but to be safe you could use UseIniInProgramDir=1

You don't need to use %$APPDATA% - %APPDATA% is more generic.

I cannot do anything about the tccloud.ini - maybe you can ask Ghisler to make the cloudplugin aware of a Registry setting like:
[HKEY_LOCAL_MACHINE\Software\Ghisler\Total Commander]
"TCCloudIniName"="%APPDATA%\\Ghisler\\tccloud.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.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

risking that a possibly existing registry IniFileName in the many HKCUs messes things up.
With the solution above I am afraid you have to delete [HKEY_CURRENT_USER\Software\Ghisler\Total Commander] for all users :-(
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
Post Reply