Weird behaviour after submenu error (%COMMANDER_PATH% as parameter)

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Clas Hortien
Member
Member
Posts: 198
Joined: 2003-03-03, 15:03 UTC

Weird behaviour after submenu error (%COMMANDER_PATH% as parameter)

Post by *Clas Hortien »

Hi,

I'm using TC 9.51 on Windows 10.
I have a buttonbar with a 2 level submenu (here KeyPass bar as menu with a sub menu of the used password file).
I use the %COMMANDER_PATH% variable to point to the referenced tools (e.g. keypass) in the subbar in a relative fashion (%COMMANDER_PATH%\..\keepass\keepass.exe) and as parameter the password file (%COMMANDER_PATH%\..\keepass\abc.kdbx).
This has worked for many years now, but since the latest updates is starts to make problems.

I think since 9.5 an error happens when I try to use the entry in the submenu:

---------------------------
KeePass
---------------------------
c:\Tools\TC\Totalcmd64.exeOMMANDER_PATH..\KeePass\abc.kdbx
Die angebene Datei kann nicht gefunden werden.
---------------------------
OK
---------------------------

The first part of the parameter in the error is the last binary I used (here c:\tools\tc\totalcmd64.exe) and the COMMANDER_PATH variable wasn't dissolved.

I started TC with a new ini (abc.ini) and created the buttonbar, the sub menu and the sub-sub menu anew.
You can find all the files and some screenshots in this zip file:
https://1drv.ms/u/s!Ah8G-ivHBVFukpBSBUTE0xuVHbOHcQ?e=mrSrXI

Now comes the fun part: Once the error occured I can no longer start any executable from my tools directory using the total commander. It just doesn't happening anything, when you double click. In the SysInternal Process Monitor you see the thread start and short after the thread exit.
Shift-Enter on the binary works (a command prompt opens that starts the binary) and using Windows Explorer works. Restarting TC doesn't help, only a reboot fixes the problem.

Best regards

Clas
User avatar
sqa_wizard
Power Member
Power Member
Posts: 3861
Joined: 2003-02-06, 11:41 UTC
Location: Germany

Re: Weird behaviour after submenu error

Post by *sqa_wizard »

Well, you cannot use %COMMANDER_PATH% at parameter line. (environment variables are not resolved at parameter line)
You have to use it at command line.
#5767 Personal license
User avatar
Stefan2
Power Member
Power Member
Posts: 4157
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Weird behaviour after submenu error

Post by *Stefan2 »

Try to double the per-cent sings:


TEST
Comamnd: cmd /k
Parameters: echo HELLO %%COMMANDER_PATH%%

It always depends who is the interpreter,... you have to try.




 
User avatar
Clas Hortien
Member
Member
Posts: 198
Joined: 2003-03-03, 15:03 UTC

Re: Weird behaviour after submenu error

Post by *Clas Hortien »

But it worked for years that way, something has changed in the last updates.
And why is my last used binary in the parameter for the Keepass ?
User avatar
petermad
Power Member
Power Member
Posts: 14793
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Weird behaviour after submenu error

Post by *petermad »

2Clas Hortien
You have never been able to use environment variables in the "Parameters:" field.
%COMMANDER_PATH% will be seen at the TC parameter %C folloved by OMMANDER_PATH
%C transfers the name of the first selected file in the panel (or if no files are selected, the name of the file under the cursor).

If you change:

Code: Select all

[Buttonbar]
Buttoncount=1
button1=%COMMANDER_PATH%\..\KeePass\KeePass.exe
cmd1=%COMMANDER_PATH%\..\KeePass\KeePass.exe
param1=%COMMANDER_PATH%\..\KeePass\abc.kdbx
path1=%COMMANDER_PATH%\..\KeePass\
iconic1=0
menu1=Private
to:

Code: Select all

[Buttonbar]
Buttoncount=1
button1=%COMMANDER_PATH%\..\KeePass\KeePass.exe
cmd1=%COMMANDER_PATH%\..\KeePass\KeePass.exe %COMMANDER_PATH%\..\KeePass\abc.kdbx
path1=%COMMANDER_PATH%\..\KeePass\
iconic1=0
menu1=Private
it should work.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Clas Hortien
Member
Member
Posts: 198
Joined: 2003-03-03, 15:03 UTC

Re: Weird behaviour after submenu error (%COMMANDER_PATH% as parameter)

Post by *Clas Hortien »

Hi,

many thanks, that solved my error in the submenu, but not the behavior that I can't execute any binary in my tools folder after some time anymore.
I see that other users have the same problem here ( https://www.ghisler.ch/board/viewtopic.php?f=28&t=53757 ), my tools folder resides in the one drive as well.

Does anybody has some idea what is going on here ?

Many thanks and stay healthy

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

Re: Weird behaviour after submenu error (%COMMANDER_PATH% as parameter)

Post by *petermad »

Try with a clean wincmd.ini file for a while and see if the problem goes away.
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.50 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply