Possible issue with %COMMANDER_PATH% (was because of "OpenFileTC 2.1")

English support forum

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
wanderer
Power Member
Power Member
Posts: 1346
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Possible issue with %COMMANDER_PATH% (was because of "OpenFileTC 2.1")

Post by *wanderer »

I have an issue with TC 950 final (x64). I'm still researcing it and not sure if it's an actual TC issue, but it would be nice if someone can verify it or share any relevant info.

I have installed TC not in the standard path, but under "D:\Program Files\Utilities\TotalCmd". As an editor, i have set "%COMMANDER_PATH%\Utils\OpenFileTC\OpenFileTC.exe".

After the upgrade to 9.50, at some point (when i pressed F4), i received a 1-time message that roughly said that there is a better alternative (internal IIRC) to OpenFileTC and asked if i wished to use it. I said Yes.

Now, after pressing F4, i receive a message saying "File not found C:\Program Files\TotalCmd\Utils\OpenFileTC\OpenFileTC.exe The handle is invalid".

I opened a cmd from within TC, i entered SET and saw that %COMMANDER_PATH% pointed to "D:\Program Files\Utilities\TotalCmd", as expected. Registry settings also point to that folder. I manually edited INI files and saw that the editor was indeed "%COMMANDER_PATH%\Utils\OpenFileTC\OpenFileTC.exe". Also, manually running OpenFileTC from within TC seems to work fine.

So, the question is: what causes TC to translate "%COMMANDER_PATH%" to "C:\Program Files\TotalCmd" instead of "D:\Program Files\Utilities\TotalCmd"?

UPDATE: For some peculiar reason, drag-drop some files onto F4 button works fine!.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

User avatar
wanderer
Power Member
Power Member
Posts: 1346
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Possible issue with %COMMANDER_PATH% translation

Post by *wanderer »

OK, after several days, i finally figured it out! I'm placing the explanation here in case someone else faces the same issue.

I had installed OpenFileTC 2.1 (found here). The first time it runs, it asks the following question:
---------------------------
Open File shell for TC
---------------------------
Attention: Application Total Commander has been found on your machine.
You can set Open File shell for TC application as the default editor for Total Commander.
Now you are using: "<YOUR EDITOR'S PATH IS PLACED HERE>"

Advantages:
- every file can be opened via F4 with the most SUITABLE editor
- simple associations setup
- OpenFileTC is not meddlesome

If you become interested in this advantages then just press YES.
Application will make any necessary actions for you.
This question won't be asked any more.
---------------------------
Yes No
---------------------------
If you press Yes, it creates a new command named em_openfiletc and also adds the following in wincmd.ini:

[Shortcuts]
F4=em_openfiletc


So, it effectively bypasses TC and replaces F4 with itself. The problem with all of these, is that command em_openfiletc had been added in usercmd.ini, which at first did not occur to me to check!

Anyway, after i found these, i removed them and problem solved!
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

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

Re: Possible issue with %COMMANDER_PATH% translation

Post by *petermad »

2wanderer
What was the cmd= in that em_openfiletc command?
After the upgrade to 9.50, at some point (when i pressed F4), i received a 1-time message that roughly said that there is a better alternative (internal IIRC) to OpenFileTC and asked if i wished to use it. I said Yes.
This is highly suspicious . smells like a virus to me.
License #524 (1994)
Danish Total Commander Translator
TC 9.5b10 32+64bit on Win XP 32bit, Win 7, 8.1 & 10 (1909) 64bit, 'Everything' 1.4.1.960 (x64)
TC 3.0b16 on Android 6.0
Get: Extended Total Commander Menus | TC Languagebar | PHSM-Calendar

User avatar
wanderer
Power Member
Power Member
Posts: 1346
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Re: Possible issue with %COMMANDER_PATH% translation

Post by *wanderer »

petermad wrote:
2020-03-04, 20:58 UTC
2wanderer
What was the cmd= in that em_openfiletc command?

This is highly suspicious . smells like a virus to me.
"C:\Program Files\TotalCmd\Utils\OpenFileTC\OpenFileTC.exe"

but this was only because i have installed OpenFileTC under "%COMMANDER_PATH%\Utils\OpenFileTC\OpenFileTC.exe".

Indeed it might look like a virus but after some research, it seems it's a standard operation of OpenFileTC 2.1. In OpenFileTC.ini, this line exists:

Code: Select all

TC_Registration_Asked_2=1
If you set it to 0 and you execute it again, the message i reported in my previous post is displayed. It seems that for some reason, the first time it did not interpret %COMMANDER_PATH% properly and instead of the location i have installed TC, it assumed "C:\Program Files\TotalCmd". The second time though, it used the proper location.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Latest TC / x32: WinXPx32 SP3 / x64: Clients/Servers from Win7SP1 through Win19Server

Post Reply