Page 1 of 1

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

Posted: 2020-04-07, 09:19 UTC
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

Re: Weird behaviour after submenu error

Posted: 2020-04-07, 09:51 UTC
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.

Re: Weird behaviour after submenu error

Posted: 2020-04-07, 12:28 UTC
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.




 

Re: Weird behaviour after submenu error

Posted: 2020-04-07, 13:03 UTC
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 ?

Re: Weird behaviour after submenu error

Posted: 2020-04-08, 13:54 UTC
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.

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

Posted: 2020-04-15, 13:30 UTC
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

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

Posted: 2020-04-15, 17:46 UTC
by petermad
Try with a clean wincmd.ini file for a while and see if the problem goes away.