Change settings files directly

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

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

Post by *petermad »

2Sheepdog
TC starts the notepad exe from Windows
Not necessarily - Tc uses the notepad.exe it finds first, and TC looks first in it's own program directory, thereafter follows the path environment - So if you put a program with the name of notepad.exe (could be a renamed textPad.exe) in TC's program directory, then that copy of notepad.exe will be used by TC.


2Clo
but I regret that TC be unable to use the stated one for F4, either always, or when the default from Win is not found
I couldn't agree more :!:
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
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Yes, the closest !

Post by *Clo »

2petermad

:) Hi Peter !
Tc uses the notepad.exe it finds first, and TC looks first in it's own program directory
• This is quite right ! I just tested this using the Swiss editor Notepad2,
I renamed the EXE and I get it alright for the INI files !
¤ BTW, I guess that Delphi programmes do this, since I have put an old <Riched32.DLL> in the folder of my HTML editor (because a bug of the XP one), and it's used, no doubt !
• So, this could be a useful test for J.A. Gruys : just do the same with an editor built as a single EXE
(and then indeed only an INI file, perhaps).

:mrgreen: FR
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

Hello Claude,

at least with Windows XP it should be (nearly) impossible that the notepad is not found. When you remove the notepad.exe in the %windir% then it is restored by XP even if the systemrecovering (dt. "Systemwiederherstellung") is disabled for all drives.

So I do not consider it a bug because TC could expect to find and open the notepad.exe. If it is actually not found there is something wrong in the system either by accident or by the deliberate intervention of the user.

Of course I still support your wish to make the selection of the editor for the ini files customizable.

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
Clo
Moderator
Moderator
Posts: 5731
Joined: 2003-12-02, 19:01 UTC
Location: Bordeaux, France
Contact:

Odd point & bug

Post by *Clo »

2Sheepdog

:) Hello Stefan !

• Well, J.A. Gruys said that he has the Notepad.exe in Windows, and that it isn't damaged - as far as I understood -
- Why TC didn't find it is the point, and why there is not any error message has a flavour of bug

- I tested that follows :
- For F4, I stated the old Notepad.exe of Win 98SE that I had renamed before - so, it's not restored at all.
- Attempting to edit a file via F4 (D&D on a button in the bar), I got an error message "File not found" or so, that is not informative, since this is the programme which is not found !
- Of course, this lands again in the issue of the too limited number of error messages, and you know the continuation…:|

- Using the Peters's trick, I got a benefit : Now, I can get the <wincmd.ini> only, because the editor I use has an option "Show a single window"… and one instance, BTW.
- I need to edit the <wcx_ftp.ini> rarely, and it's always boring to have it to close at each time. I requested two different menu entries ages ago, nope…
Of course I still support your wish to make the selection of the editor for the ini files customizable.
- Thank you ! But this is not only my wish, many users would be happy to get such an option, and are able to choose the appropriate editor (tabbed if necessary, in order to display the INI¦s and any text file already on edition.
- Hum… There are some threads to bump, I think ! :P

:mrgreen: VG
Claude
Clo
#31505 Traducteur Français de TC French translator Aide en Français Tutoriels Français English Tutorials
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Re: Odd point & bug

Post by *m^2 »

Clo wrote:
Of course I still support your wish to make the selection of the editor for the ini files customizable.
- Thank you ! But this is not only my wish, many users would be happy to get such an option, and are able to choose the appropriate editor (tabbed if necessary, in order to display the INI¦s and any text file already on edition.
- Hum… There are some threads to bump, I think ! :P

:mrgreen: VG
Claude
Clo
http://ghisler.ch/board/viewtopic.php?t=12012
http://ghisler.ch/board/viewtopic.php?t=11806
http://ghisler.ch/board/viewtopic.php?t=4909
http://ghisler.ch/board/viewtopic.php?t=12127
User avatar
J.A. Gruys
Member
Member
Posts: 130
Joined: 2003-07-29, 07:49 UTC
Location: Netherlands

Post by *J.A. Gruys »

No, I never had an older OS on my PC. I bought it with WindowsXP pre-installed.

What I *have* done must be this: after installing NotaTabLight, I followed a suggestion from NoteTab's Help that runs:

"Can I replace Notepad with this editor?
Yes! If NoteTab is correctly installed, you will find a command called "Replace MS Notepad" under the Help menu. When you choose that command, NoteTab will first rename Notepad by adding the extension ".MS" to the program file. Then, it will copy a special little program called NOTEPAD.STB to the Windows directory and rename it NOTEPAD.EXE. Whenever this program is executed, it launches NoteTab instead of Notepad. If you want to restore MS Notepad after this operation, just use the command "Restore MS Notepad", which is also available under the Help menu."

That evidently produced the consequences described in my original posting. Undoing that, but keeping NoteTab as TCMD's editor, resulted in (1) having NoteTab still as TCMD's F4 editor, and (2) being able to use "Change settings files directly" again as it should. What are the further consequences (if any) I have not yet tried.

There resides a notepad exe in my windows directory and an identical one in my windows\system32. It was the second one that was affected by applying notepad.stb, and that I have changed back by renaming the files of which the names were changed by NoteTab.
J.A.G.
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Re: Odd point & bug

Post by *Sheepdog »

Clo wrote:2Sheepdog

:) Hello Stefan !

• Well, J.A. Gruys said that he has the Notepad.exe in Windows, and that it isn't damaged - as far as I understood -
- Why TC didn't find it is the point, and why there is not any error message has a flavour of bug
But he stated that he managed to make NoteTab his windows default editor, and reversing this setting he could open the ini files.

Thus he did a deliberate intervention to the system.
petermad wrote: 2Sheepdog
TC starts the notepad exe from Windows
Not necessarily - Tc uses the notepad.exe it finds first, and TC looks first in it's own program directory, thereafter follows the path environment - So if you put a program with the name of notepad.exe (could be a renamed textPad.exe) in TC's program directory, then that copy of notepad.exe will be used by TC.
Thanks for that valuable hint. I did not know about it.
- I tested that follows :
- For F4, I stated the old Notepad.exe of Win 98SE that I had renamed before - so, it's not restored at all.
I meant that XP restores the notepad.exe if it is replaced in the %windir%, not anywhere else in the system. When you rename any program to 'notepad.exe' and overwrite that notepad.exe in the %windir% XP restores it in within a few seconds with the original one ( if you don't use the above mentioned trick).
- Attempting to edit a file via F4 (D&D on a button in the bar), I got an error message "File not found" or so, that is not informative, since this is the programme which is not found !
- Of course, this lands again in the issue of the too limited number of error messages, and you know the continuation…:|
:(
- Using the Peters's trick, I got a benefit : Now, I can get the <wincmd.ini> only, because the editor I use has an option "Show a single window"… and one instance, BTW.
- I need to edit the <wcx_ftp.ini> rarely, and its always boring to have it to close at each time. I requested two different menu entries ages ago, nope…
That for I use a usercommand for editing the ini-files for ages....
[/quote]
Of course I still support your wish to make the selection of the editor for the ini files customizable.
- Thank you ! But this is not only my wish, many users would be happy to get such an option, and are able to choose the appropriate editor (tabbed if necessary, in order to display the INI¦s and any text file already on edition.[/quote]

I know that it is requested by many users. I just thought it is a good occasion to mention this request another time in case the Author will read this thread. ;)
In German we have a proverb. "Steter Tropfen höhlt den Stein. (Constant drops hollow out the stone.)"

sheepdog

[edit]

2J.A. Gruys
Thanks for the explanation.
[/edit]
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes ,TC always uses notepad to ensure that a text editor is used. The user may have defined anything ( e.g. Irfanview) for F4...
Author of Total Commander
https://www.ghisler.com
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 »

So maybe an ini entry?
User avatar
Sheepdog
Power Member
Power Member
Posts: 5150
Joined: 2003-12-18, 21:44 UTC
Location: Berlin, Germany
Contact:

Post by *Sheepdog »

m^2 wrote:So maybe an ini entry?
In addition with a 'fallback' if the editor in question is not present?

sheepdog
"A common mistake that people make when trying to design something
completely foolproof is to underestimate the ingenuity of complete fools."
Douglas Adams
User avatar
BlackWinny
Junior Member
Junior Member
Posts: 45
Joined: 2014-01-18, 16:10 UTC
Location: Close to Paris, France

Re: Change settings files directly

Post by *BlackWinny »

Here is the solution that I use and which works perfectly :

Step 1:

On the menu bar, click the menu Configuration then Button Bar:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image1.png

Step 2:

At the top left of the appearing panel, click the button Add:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image2.png

Step 3:

Then click the button Change:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image3.png

Step 4:

On the appearing menu, click Insert file name:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image4.png

Step 5:

Find your application, select it, then click the button Open (on my example I use the famous editor Notepad++ which is awesome as several others of that kind):

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image5.png

Step 6:

Result at this step:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image6.png

Step 7:

Now:
A- Write C:\Users\K\AppData\Roaming\GHISLER\WINCMD.INI (replacing "K" with your own Windows profile name) in the Parameters field.
B- Repeat the same directory in the Start path field.
C- Below, select an icon among the available icons of the application your chose (if there are several icons for your application).
D- Then write a small text to use as tooltip for the button your are creating.
E- And finally click the button OK:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image7.png

Step 8:

Done:

Image: http://black.winny.free.fr/Micro/TotalCommander/Open_config_file_with_any_text_editor/Image8.png

Click your new button. It works perfect.
:D
Post Reply