tcCmdVerify v0.24 - Check/modify Total Commander setup

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Thank you again for your tool. But there are some valid strings considered as bad:

Code: Select all

%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe %COMMANDER_DRIVE%\Utils\CloneSpy\CloneSpyResult.txt|c:\Utils\totalcmd\Compare.bar|Buttonbar|cmd10
TC does not recognize environment variables in the "Parameters" field, so if the parameter contains one, I need to put it to the "Command" filed.

Code: Select all

cmd /k format f: /fs:ntfs|c:\Utils\totalcmd\Commands.BAR|Buttonbar|cmd9
%Comspec% /k CHKDSK e: /F|c:\Utils\totalcmd\Commands.BAR|Buttonbar|cmd11
c:\Windows\System32\cmd.exe. cmd and %Comspec% are the same commands.

Code: Select all

https://www.jottacloud.com/|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|cmd21
URLs in command field open the specified page in the default browser.

Code: Select all

%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe /c "PowerPro"|c:\Utils\totalcmd\OpenWith.bar|Buttonbar|cmd3
EmEditor has the configuration (/c) key. The same ("-" instead of "/") is for USB Safe:

Code: Select all

%COMMANDER_DRIVE%\Utils\Tray\USBSafe\usr.exe stop -d|c:\Utils\totalcmd\USBSafelyRemove.BAR|Buttonbar|cmd5
Single user license #329241
PowerPro scripts for Total Commander
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Thanks for the reports Vochomurka, I'm at work atm. so will have to correct these later, but most issuses mentioned seems to be quick and easy things to fix. So these are just my thoughts for the next version.

btw: I'm thinking my script is a bit strict on f.ex missing icon paths in the menu .ini and ofc on the requirement of quotes when TC's environment variable was used (in case there are spaces in TC's path at some point). As that is stuff I care about, but most don't.
So I might make these checks optional.
Vochomurka wrote:

Code: Select all

%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe %COMMANDER_DRIVE%\Utils\CloneSpy\CloneSpyResult.txt|c:\Utils\totalcmd\Compare.bar|Buttonbar|cmd10
TC does not recognize environment variables in the "Parameters" field, so if the parameter contains one, I need to put it to the "Command" filed.
Actually TC does support environment variables in the parameters field if you double up the %'s like such:
cmd: %COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe
parameter: %%COMMANDER_DRIVE%%\Utils\CloneSpy\CloneSpyResult.txt

So I wont make tcCmdVerify move them to the command fields, but I agree in that such incorrect use of environment paths should be reported. It's easy to check for, as all I'll need to do is check for the existance of 2 single %'es in the parameter field, if so the tool should suggest doubling them up to two %%'s
Vochomurka wrote:

Code: Select all

cmd /k format f: /fs:ntfs|c:\Utils\totalcmd\Commands.BAR|Buttonbar|cmd9
%Comspec% /k CHKDSK e: /F|c:\Utils\totalcmd\Commands.BAR|Buttonbar|cmd11
c:\Windows\System32\cmd.exe. cmd and %Comspec% are the same commands.
tcCmdVerify already tries to handle cmd's starting with %COMSPEC%, & CMD, but I've not made a workaround if "cmd.exe" is typed, I can do that for the upcoming version.

I can confirm this command being wrongfully reported as missing: "%Comspec% /k CHKDSK e: /F"
It finds it if I write this:
"%Comspec% /k CHKDSK.EXE e: /F"
It will be easy to fix, I'll make it check for the existance of whatever.exe from the next version.
It's probably the same issue with your format command in v0.07 and below.
Vochomurka wrote:

Code: Select all

https://www.jottacloud.com/|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|cmd21
URLs in command field open the specified page in the default browser.
tcCmdVerify skips the cmd's starting with http:// but I forgot https://
The next version will handle them.
Vochomurka wrote:

Code: Select all

%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe /c "PowerPro"|c:\Utils\totalcmd\OpenWith.bar|Buttonbar|cmd3
EmEditor has the configuration (/c) key. The same ("-" instead of "/") is for USB Safe:

Code: Select all

%COMMANDER_DRIVE%\Utils\Tray\USBSafe\usr.exe stop -d|c:\Utils\totalcmd\USBSafelyRemove.BAR|Buttonbar|cmd5
Does these ones get wrongfully reported as missing as well?
I don't understand why for those 2 yet.
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Actually TC does support environment variables in the parameters field if you double up the %'s like such:
cmd: %COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe
parameter: %%COMMANDER_DRIVE%%\Utils\CloneSpy\CloneSpyResult.txt
Please try the following button:

Code: Select all

TOTALCMD#BAR#DATA
%WINDIR%\notepad.exe
%%WINDIR%%\System32\drivers\etc\hosts
%COMMANDER_EXE%,4
Edit hosts


-1
Paths are valid for every computer, I guess. So, this button does not work, whereas

Code: Select all

TOTALCMD#BAR#DATA
%WINDIR%\notepad.exe %WINDIR%\System32\drivers\etc\hosts

%COMMANDER_EXE%,4
Edit hosts


-1
does
Single user license #329241
PowerPro scripts for Total Commander
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2Vochomurka
You and magz are both right. TC needs double percent signs to correctly use env variables in the parameters field. The suggested notepad button doesn't work because Notepad doesn't support env variables (doesn't resolve them by itself). So, env variables in the parameters field only work as intended if the launched program supports/resolves them.

Note: You have to be careful with parameters in the command field. They won't work in every case. I had some case in the past; unfortunately, I can't remember the exact circumstances...

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

How can one know whether some application resolves envvars or not? For example, Microsoft Word does not either:

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_DRIVE%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE
%%COMMANDER_DRIVE%%\Utils\PowerPro\PowerPro.doc
%COMMANDER_DRIVE%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE
PowerPro.doc


-1
does not work, but

Code: Select all

TOTALCMD#BAR#DATA
%COMMANDER_DRIVE%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE %COMMANDER_DRIVE%\Utils\PowerPro\PowerPro.doc

%COMMANDER_DRIVE%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE
PowerPro.doc


-1
does
Single user license #329241
PowerPro scripts for Total Commander
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

2Vochomurka
Well, I guess most programs don't resolve them by themselves.

However, you can always use %ComSpec% in the command field and let CMD resolve the env variables. You should make sure to tick [X] run minimized then (to avoid the CMD window popping up).

So, something like

Code: Select all

TOTALCMD#BAR#DATA
%ComSpec%
/C ""%%COMMANDER_DRIVE%%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE" "%%COMMANDER_DRIVE%%\Utils\PowerPro\PowerPro.doc""

%COMMANDER_DRIVE%\Utils\Microsoft Office\OFFICE11\WINWORD.EXE
PowerPro.doc


-1
should do.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2magz

In the "command path not found" I get these, that shouldn't be there:

Code: Select all

OPENLANGUAGEFILE wcmd_dan.lng
em_anyexternalcommand
FTPOPEN sessionname
FTPOPEN
%COMSPEC% /k set
%COMMANDERPATH%\LANGUAGE\wcmd_pm_dan.bar
ms-settings:otherusers
ms-settings:notifications
ms-settings:
%systemroot%\helppane.exe -Home
%CommonProgramFiles%\Microsoft Shared\Ink\mip.exe
%windir%\explorer.exe shell:::{2559a1f3-21d7-11d4-bdaf-00c04f60b9f0}
%windir%\Speech\Common\sapisvr.exe -SpeechUX
%ProgramFiles(x86)%\Internet Explorer\iexplore.exe -extoff
*%windir%\system32\sdclt.exe
It would also be nice - maybe as an option - that commands without a path, where the path is included in the PATH environment would not be shown in the list - for example control.exe which is in c:\Windows\system32 which is in my PATH environment (as in most peoples)

In the "Icon path" I get these, that should not be there:

Code: Select all

%windir%\system32\Speech\SpeechUX\speechuxcpl.dll
%CommonProgramFiles%\Microsoft Shared\Ink\mip.exe
In the "cmd paths missing quotes" I get a lot of for example these:

Code: Select all

%COMMANDER_PATH%\TOOLS\SetFolderDate\SetFolderDate.exe
But since my %COMMANDER_PATH% doesn't contain spaces, there is no need for quotes - I think only paths with spaces but without quotes should be listed here
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
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

petermad wrote: In the "command path not found" I get these, that shouldn't be there:

Code: Select all

OPENLANGUAGEFILE wcmd_dan.lng
I shall make tcCmdVerify look within the language folder when OPENLANGUAGEFILE is used from the next version, as I guess that is where it resides (it would have found it if it was in TC's root folder, or if this was the command: OPENLANGUAGEFILE Language\wcmd_dan.lng)
I'll fix it from v0.08 which is coming soon.
petermad wrote:

Code: Select all

em_anyexternalcommand
By this do you mean any external command?
or is there a command with that name in your setup?
and if so does that command have a blank or no cmd field?
petermad wrote:

Code: Select all

%COMMANDERPATH%\LANGUAGE\wcmd_pm_dan.bar
I believe it was correct of tcCmdVerify in reporting that file path as missing in your setup Sir.
At least on my system %COMMANDERPATH% wont work, but %COMMANDER_PATH% will.
I am very pleased that my simple script was able to spot a typing error in your setup, since I use your extended menus.
Now if tcCmdVerify spots a mistake in Mr. Ghisler's private TC setup as well then I can die happy. :)
petermad wrote:

Code: Select all

*%windir%\system32\sdclt.exe
hmm, weird, I thought I had fixed the issue with the * admin mark in v0.05 and I can't reproduce with v0.07. Where you using v0.07?
petermad wrote:In the "cmd paths missing quotes" I get a lot of for example these:

Code: Select all

%COMMANDER_PATH%\TOOLS\SetFolderDate\SetFolderDate.exe
But since my %COMMANDER_PATH% doesn't contain spaces, there is no need for quotes - I think only paths with spaces but without quotes should be listed here
yeah, I was thinking about making this optional:
magz wrote:btw: I'm thinking my script is a bit strict on f.ex missing icon paths in the menu .ini and ofc on the requirement of quotes when TC's environment variable was used (in case there are spaces in TC's path at some point). As that is stuff I care about, but most don't.
So I might make these checks optional.
Due to your request I change my opinion from "I might" to "I will", in a version soon to come (but probably not in v0.08 )
How do you feel about my script reporting missing icons in the menu.ini?

I'll reply to the other issues when posting v0.08
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

By this do you mean any external command?
I mean any external command - they all have a cmd field. They are mostly named like: em_ext_something
At least on my system %COMMANDERPATH% wont work, but %COMMANDER_PATH% will.
Sorry - that was a typo in the report here above - not in the real ini-file - there it is %COMMANDER_PATH%\LANGUAGE\wcmd_pm_dan.bar
hmm, weird, I thought I had fixed the issue with the * admin mark in v0.05 and I can't reproduce with v0.07. Where you using v0.07?
Yes I can reproduce it with v0.07 (my name is Bond)
How do you feel about my script reporting missing icons in the menu.ini?
I am not sure what you mean by that...?
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
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

petermad wrote:
By this do you mean any external command?
I mean any external command - they all have a cmd field. They are mostly named like: em_ext_something
How do you feel about my script reporting missing icons in the menu.ini?
I am not sure what you mean by that...?
Sorry, understandable that lead to confusion.
I mean the external commands, within the ini file by the same name as the .mnu file.
That file is built up like the usercmd.ini (I am 100% sure you know this part, as I learned this by studying your extended menus.)
The .ini containing the extended menu commands (or external commands) which also, like the usercmd.ini, has the "button = " key, pointing to icon paths, but as most of the external commands are used within the menu, icons are less useful. tcCmdVerify reports any missing icons it finds within the extended menus still, at least in v0.07. And I wanted to know how you feel about this, I was thinking I should probably make the check for icons within the extended commands optional.

I'm thinking that I may have messed up with some poor environment variable handling (only checking for %COMMANDER_PATH%) in my code for getting the extended menus .ini
Under stats, at the right, the stat saying: "menu .ini commands"
is there a number higher then 0 in front of that for you?
And if you click that number do you see your external commands?
and if not, can you tell me what this key "Mainmenu =" under wincmd.ini's [Configuration] section holds please?
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

tcCmdVerify reports any missing icons it finds within the extended menus still, at least in v0.07. And I wanted to know how you feel about this, I was thinking I should probably make the check for icons within the extended commands optional.
I think it should be optional, because as you write - the icons are rarely used in my wcmd_pm_dan.ini file.
Under stats, at the right, the stat saying: "menu .ini commands"
is there a number higher then 0 in front of that for you?
No the number is 0. but the same section show 134 cmd paths missing quotes.

http://madsenworld.dk/tcmd/tcmdverify007.png
And if you click that number do you see your external commands?
No, no commands.
and if not, can you tell me what this key "Mainmenu =" under wincmd.ini's [Configuration] section holds please?
Mainmenu=wcmd_pm_dan.mnu
thats my own working version of my extended menu.
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
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

tcCmdVerify v0.08 has just been uploaded.

It now looks for the executables in all folders listed in your %path%, this slows down the startup a bit.

It now reports missing commands pointed to from the menu.

You can save the selected paths now.

I've made the check for icons within extended menu commands optional.
I've also made the check for if quotes are used when %COMMANDER_PATH% is used (in case TC's path has spaces at one point) optional.

I've tried to fix all the "false positives".
Please report if some remain, or others are found.
I'm sure I must've forgotten something.

There is a planned feature for the free space.
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

Single user license #329241
PowerPro scripts for Total Commander
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Hmm looks like most of the labels gets chopped off, I'm guessing it's my choice of Helvetica as font which makes trouble, I switched to arial as font now, as I guess it's more common to have installed, and just uploaded v0.09 with this fix for you. I hope it looks alright now.
This is how it looks like for me:
Image: http://picload.org/image/plarwcw/tccmdverifyv009b.jpg

Edit:
Quick fix as I messed up some other labels slightly I just uploaded v0.09b, 20 min after v0.09
User avatar
Vochomurka
Power Member
Power Member
Posts: 814
Joined: 2005-09-14, 22:19 UTC
Location: Russia
Contact:

Post by *Vochomurka »

2magz
The top (1404) invisibility is corrected, two others are exactly the same.
My configuration: Win7x64Eng, standard theme. Default Windows font "Tahoma" was never changed
Single user license #329241
PowerPro scripts for Total Commander
Post Reply