Possible bug: location of default.bar file in Win7
Moderators: Hacker, petermad, Stefan2, white
Possible bug: location of default.bar file in Win7
I recently installed TC on a fresh install of Win7-64 Ultimate. The installation directory was C:\Program Files\totalcmd\.
I made some configuration changes to TC and modified the Button Bar (added a button).
The config files were written to ...\roaming\ghisler\. All was well, and configuration was preserved through many reboots.
Then (for reasons unrelated to TC) I turned UAC off and rebooted. Now TC does not remember changes to Button Bar!
Making further changes to button bar creates a new DEFAULT.BAR file in the install directory (not the ...roaming... location).
Turned UAC back on and rebooted. Now Button Bar reflects the (first round of) changes - my added button is back.
Searching the registry and WINCMD.INI file does not immediately reveal how the location of the DEFAULT.BAR file is decided.
I don't know if this is a bug or my poor understanding of how user profiles are managed on Windows 7 (I am new to 7).
Thanks for any assistance.
I made some configuration changes to TC and modified the Button Bar (added a button).
The config files were written to ...\roaming\ghisler\. All was well, and configuration was preserved through many reboots.
Then (for reasons unrelated to TC) I turned UAC off and rebooted. Now TC does not remember changes to Button Bar!
Making further changes to button bar creates a new DEFAULT.BAR file in the install directory (not the ...roaming... location).
Turned UAC back on and rebooted. Now Button Bar reflects the (first round of) changes - my added button is back.
Searching the registry and WINCMD.INI file does not immediately reveal how the location of the DEFAULT.BAR file is decided.
I don't know if this is a bug or my poor understanding of how user profiles are managed on Windows 7 (I am new to 7).
Thanks for any assistance.
Hello, osmosis.
Scenario 1:
Windows UAC is active. As a consequence only processes launched in elevated mode can write (create/modify) files in subolders of %programfiles%.
Total Commander has not been told not to store its default.bar in its default location which is %COMMANDER_PATH%. Positively said: As you have not explicitly instructed T.C. to do otherwise, T.C. still wants to write its default.bar to %COMMANDER_PATH%.
Yet, you do not launch T.C. elevated, therefore T.C. has got no write privileges on its own files. Therefore T.C. silently decides to put your default.bar into the folder where wincmd.ini has been stored, %APPDATA%\Roaming\Ghisler.
Scenario 2:
Windows UAC is inactive. As a consequence your admin account has got full access rights on %programfiles% and its subfolders. You are always running in elevated mode without having to ask for it.
T.C. still wants to write its default.bar to %COMMANDER_PATH%.
Now it can do so. Therefore it ignores any default.bar previously stored elsewhere and uses the default.bar inside %COMMANDER_PATH% again.
Solution:
Explicitly instruct T.C. to use the default.bar in %appdata%\Roaming\Ghisler e.g. This will write the fully qualified pathname to the parameter Buttonbar in the file wincmd.ini.
As a consequence, no matter whether UAC is active or inactive, T.C. will always use the default.bar file in %appdata%\roaming\ghisler.
Kind regards and Happy New Year,
Karl
Scenario 1:
Windows UAC is active. As a consequence only processes launched in elevated mode can write (create/modify) files in subolders of %programfiles%.
Total Commander has not been told not to store its default.bar in its default location which is %COMMANDER_PATH%. Positively said: As you have not explicitly instructed T.C. to do otherwise, T.C. still wants to write its default.bar to %COMMANDER_PATH%.
Yet, you do not launch T.C. elevated, therefore T.C. has got no write privileges on its own files. Therefore T.C. silently decides to put your default.bar into the folder where wincmd.ini has been stored, %APPDATA%\Roaming\Ghisler.
Scenario 2:
Windows UAC is inactive. As a consequence your admin account has got full access rights on %programfiles% and its subfolders. You are always running in elevated mode without having to ask for it.
T.C. still wants to write its default.bar to %COMMANDER_PATH%.
Now it can do so. Therefore it ignores any default.bar previously stored elsewhere and uses the default.bar inside %COMMANDER_PATH% again.
Solution:
Explicitly instruct T.C. to use the default.bar in %appdata%\Roaming\Ghisler e.g. This will write the fully qualified pathname to the parameter Buttonbar in the file wincmd.ini.
As a consequence, no matter whether UAC is active or inactive, T.C. will always use the default.bar file in %appdata%\roaming\ghisler.
Kind regards and Happy New Year,
Karl
2karlchen
Very well explained!
2ghisler(author)
TC behaves quite strange here. It copies the default bar from its program dir to its ini dir. That's fine.
But TC doesn't change the path in wincmd.ini automatically although a new file is used.
Expected: The button bar path should be changed automatically.
Very well explained!
2ghisler(author)
TC behaves quite strange here. It copies the default bar from its program dir to its ini dir. That's fine.
But TC doesn't change the path in wincmd.ini automatically although a new file is used.
Expected: The button bar path should be changed automatically.
2karlchen
Thanks for your quick and thorough reply. Your suggestion about adding the buttonbar path to the .ini file worked.
Is there a way to do this from within TC? I couldn't find one, so I just manually edited the .ini file.
2Lefteous
I'm with you on the strangeness. The default.bar file does not seem to be handled as one would expect. It seems logically equivalent to the FTP config file, but is not treated the same.
I guess the reason the button bar config is broken out from the main config is to allow multiple bars, but it seems like the default bar could be handled more logically.
And I'm a little suspicious that hard-coding the button bar path into the .ini file may violate some MS rule about how the user paths/files are managed (by Win7).
2ghisler(author)
I guess this was never an issue as long as everything was kept in one place, but when config files start moving around (due to UAC or MS handling of user files) things start getting confusing.
Maybe you could give it some thought?
Thanks again to all and Happy New Year!
Thanks for your quick and thorough reply. Your suggestion about adding the buttonbar path to the .ini file worked.
Is there a way to do this from within TC? I couldn't find one, so I just manually edited the .ini file.
2Lefteous
I'm with you on the strangeness. The default.bar file does not seem to be handled as one would expect. It seems logically equivalent to the FTP config file, but is not treated the same.
I guess the reason the button bar config is broken out from the main config is to allow multiple bars, but it seems like the default bar could be handled more logically.
And I'm a little suspicious that hard-coding the button bar path into the .ini file may violate some MS rule about how the user paths/files are managed (by Win7).
2ghisler(author)
I guess this was never an issue as long as everything was kept in one place, but when config files start moving around (due to UAC or MS handling of user files) things start getting confusing.
Maybe you could give it some thought?

Thanks again to all and Happy New Year!
Hello, osmosis.
MVV is right as always.
Inside Total Commander click on the menu item "Configuration" => "Change Button Bar". Next click on the button "[>>]" and select the button bar file which you want to load. Confirm the question whether you want to make the selected button bar file the default button bar.
Kind regards,
Karl
MVV is right as always.

Inside Total Commander click on the menu item "Configuration" => "Change Button Bar". Next click on the button "[>>]" and select the button bar file which you want to load. Confirm the question whether you want to make the selected button bar file the default button bar.
Kind regards,
Karl
Birch---
2osmosis
Hello !
• Just an aside thought :
- Using the "Program Files" folder to install TC is “To make a rod for one's own back”…
Same for all other MS' chamber pots…
- As long as it's for a home PC, the restored old location X:\Totalcmd avoids a lot of such annoyances…
- Just my opinion, though.
KR
Claude
Clo

• Just an aside thought :
- Using the "Program Files" folder to install TC is “To make a rod for one's own back”…
Same for all other MS' chamber pots…

- As long as it's for a home PC, the restored old location X:\Totalcmd avoids a lot of such annoyances…
- Just my opinion, though.

Claude
Clo
#31505 Traducteur Français de T•C French translator Aide en Français Tutoriels Français English Tutorials
Hi, Lefteous.
Well, by explicitly selecting the default.bar file located in the folder %APPDATA%\Roaming\Ghisler, T.C. will be made to write the full path to the buttonbar parameter inside wincmd.ini.
This prevents T.C. from silently switching between the two default.bar files inside %COMMANDER_PATH% and %APPDATA%\Roaming\Ghisler depending on the UAC status (off vs. on).
It may be a T.C. internal problem, but you can work around it easily.
Karl
Well, by explicitly selecting the default.bar file located in the folder %APPDATA%\Roaming\Ghisler, T.C. will be made to write the full path to the buttonbar parameter inside wincmd.ini.
This prevents T.C. from silently switching between the two default.bar files inside %COMMANDER_PATH% and %APPDATA%\Roaming\Ghisler depending on the UAC status (off vs. on).
It may be a T.C. internal problem, but you can work around it easily.
Karl