What is the usecase for UseIniInProgramDir=4 ?
Moderators: Hacker, petermad, Stefan2, white
What is the usecase for UseIniInProgramDir=4 ?
Hi,
I was just setting up an independent TC installation for testing and accidentally I put UseIniInProgramDir=4 instead of UseIniInProgramDir=7 into wincmd.ini. And what I ended up with was an always clean, read-only wincmd.ini - no settings could be saved.
Help file says "4: Override registry settings (but not command line parameters)", which doesn't really describe the actual outcome of the setting.
So, can someone explain to me, what the usecase of that setting is? (Except for being perfect when trying to reproduce a bug in a clean TC.)
Thanks
I was just setting up an independent TC installation for testing and accidentally I put UseIniInProgramDir=4 instead of UseIniInProgramDir=7 into wincmd.ini. And what I ended up with was an always clean, read-only wincmd.ini - no settings could be saved.
Help file says "4: Override registry settings (but not command line parameters)", which doesn't really describe the actual outcome of the setting.
So, can someone explain to me, what the usecase of that setting is? (Except for being perfect when trying to reproduce a bug in a clean TC.)
Thanks
Windows 10 Pro x64, Windows 11 Pro x64
- ghisler(Author)
- Site Admin
- Posts: 50895
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
4 alone does nothing. It's only useful in combination with 1 (wincmd.ini) and 2 (wcx_ftp.ini). If you add 4, and then start TC with /i=other.ini, this will override UseIniInProgramDir option.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
2umbra
The options are like this:
UseIniInProgramDir=1
UseIniInProgramDir=2
UseIniInProgramDir=3 (wich is 1+2)
UseIniInProgramDir=4
UseIniInProgramDir=5 (which is 1+4)
UseIniInProgramDir=6 (which is 2+4)
UseIniInProgramDir=7 (which is 1+2+4)
The options are like this:
UseIniInProgramDir=1
UseIniInProgramDir=2
UseIniInProgramDir=3 (wich is 1+2)
UseIniInProgramDir=4
UseIniInProgramDir=5 (which is 1+4)
UseIniInProgramDir=6 (which is 2+4)
UseIniInProgramDir=7 (which is 1+2+4)
Last edited by petermad on 2017-11-03, 19:51 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Well, it's described as a flag and I don't see any note saying, that "4" should not be used alone, unlike the other flag values.
And "4 alone" does something. It switches TC into a readonly mode. Just maybe not intentionally.
Anyway, now I at least know there is no official usecase. Thanks
And "4 alone" does something. It switches TC into a readonly mode. Just maybe not intentionally.
Anyway, now I at least know there is no official usecase. Thanks
Windows 10 Pro x64, Windows 11 Pro x64
Help:
There are at least 23 other parameters that use "the sum of".It is the sum of the following values:
1: Use wincmd.ini in program dir if no other location is set via registry or parameters
2: Use wcx_ftp.ini in program dir if no other location is set via registry or parameters
4: Override registry settings (but not command line parameters)
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
2umbra
I just tested it (with TC 9.0a): when UseIniInProgramDir=4 is set, TC ignores the location from the registry and uses %Temp%\portable.ini as its settings file. All TC settings can be changed and are written to that file. Maybe this file exists on your system and it can't be written to (read-only and/or because of permissions)?
Regards
Dalai
I just tested it (with TC 9.0a): when UseIniInProgramDir=4 is set, TC ignores the location from the registry and uses %Temp%\portable.ini as its settings file. All TC settings can be changed and are written to that file. Maybe this file exists on your system and it can't be written to (read-only and/or because of permissions)?
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Hmm, here (TC 9.12rc2) TC ignores the registry setting and tries to use c:\windows\wincmd.ini, which is not possible because if I am not running TC as admin I cannot write to c:\windows since after Window XP.TC ignores the location from the registry and uses %Temp%\portable.ini
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
2petermad
Well, that's possible. I just made a quick test with the wincmd.ini of my regular portable TC. Meaning that it has some more settings which might change TC's behavior. However, at first I guessed in the same direction (that TC uses the default location %SystemRoot%\wincmd.ini) when UseIniInProgramDir=4. Not sure why this wasn't the case in my tests, but it doesn't matter anyway.
Regards
Dalai
Well, that's possible. I just made a quick test with the wincmd.ini of my regular portable TC. Meaning that it has some more settings which might change TC's behavior. However, at first I guessed in the same direction (that TC uses the default location %SystemRoot%\wincmd.ini) when UseIniInProgramDir=4. Not sure why this wasn't the case in my tests, but it doesn't matter anyway.
Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64
Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Yes, but flags should work either combined or on their own. If there are any combinations, that are not valid, it's a sign that they should be separated into more independent settings or removed completely.petermad wrote:There are at least 23 other parameters that use "the sum of".
That would explain the behavior I see.petermad wrote:Hmm, here (TC 9.12rc2) TC ignores the registry setting and tries to use c:\windows\wincmd.ini, which is not possible because if I am not running TC as admin I cannot write to c:\windows since after Window XP.
But that brings me back to the reason why I've opened this topic. Would you expect such behavior based on what the documentation says? I did not. That's why I asked you for some ideas to help me understand it.
Windows 10 Pro x64, Windows 11 Pro x64
You are right - sorry for confusing it - it was because Ghisler wrote: "4 alone does nothing. It's only useful in combination with 1 (wincmd.ini) and 2".Yes, but flags should work either combined or on their own.
Well, If you don't use 1 or 2, the TC program dir is out of the question. 4 itself overrides the registry setting.But that brings me back to the reason why I've opened this topic. Would you expect such behavior based on what the documentation says?
The order of options for ini-file location when you install TC is:
1. Windows' dir
2. TC's program dir
3. %APPDATA%
4. Documents & settings
5. User defined
So I guess when TC's program dir and any registry setting is overruled then TC uses the first option: Windows' dir.
It is not very expedient to use Window's dir on later Windows versions (post XP) because of user restrictions, but I gues it is a remnant from old days, that TC defaults to Windows' dir.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar