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: Stefan2, white, sheep, Hacker

Post Reply
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

tcCmdVerify v0.24 - Check/modify Total Commander setup

Post by *magz » 2015-10-17, 09:02 UTC

tcCmdVerify v0.24 updated on the 10th of June 2018

Screenshot: Image: https://picload.org/image/rliwaopi/tccmdverify_v019001.jpg

This is made for Total Commander fan boys (and girls) with a TC-setup so extensive that they would like some assistanse in finding potential issues with it, which is a lot of work when you have hundreds of commands. As this program evolves I also think that it holds features useful to people with an interest in a tool to efficiently modify their setup.

It goes through all your plugins, and all the commands set up in your wincmd.ini under associations, user (start menu) and extensions.
It checks the buttonbar buttons in the default bar as well as all other buttonbars in the same folder.
It also checks the commands in the usercmd.ini file and in the ini file with extended menus (by the same name as the .mnu file).

Conditions it checks for:
- If the path to the command executable exists
- If the path to the icon exists
- If the path of the start path exists (unless it's blank)
- If the paths to the plugins in wincmd.ini exists
- If there has been used quotes around the TC variables %1, %T or %P in parameters
- If the environment variable %COMMANDER_PATH% has been used instead of the path to Totalcmd folder
- If there has been used quotes when TC's environment variable was used
- if double %% has been used around environment variables in the parameter field
- if there are commands in the buttonbar that is not in the usercmd.ini file or the menu.ini
- if there are duplicate commands.
- if there are commands which have been saved in the ini files (usercmd.ini file or .ini that comes with the menu), where the buttonbar still doesn't point to the .ini command name
- if there are commands which have been saved in the ini files but have not been pointed to from the menu
- If the extended menu is pointing to missing commands
- If the settings in wincmd.ini makes the installation portable. (this check may be turned off)
- if there are commands or parameters using %programfiles% or %commonprogramfiles% in a way that makes them accessible from only a certain Total Commander CPU architecture version, like when pointing to "%programfiles% (86)" then %programfiles(X86)% or %ProgramW6432% (86) will be suggested to allow the commands to work from both 32bit and 64bit TC.

There are some statistics displayed at the right side of the main GUI window. The time taken to load tcCmdVerify will be displayed as part of the title.

Due to bug testing during development, you can click on a couple of the numbers and labels displayed to show some extra info:
- Clicking on the nr to the left of "cmd paths missing quotes" will display a listing with how the script feels the corrected cmd paths should look like, with quotes.
- Clicking on the nr to the left of "parameters missing quotes", will do the same for parameters, atm. the script is bad at parameter quote adding though
- Clicking on the nr to the left of "usercmd.ini commands" under stats, will show the user command names
- Clicking on the nr to the left of "extended commands" under stats, will show the extended menu command names
- Clicking on the nr to the left of "extension commands" under stats, will show extension command paths found in wincmd.ini
- Clicking on the nr to the left of "association commands" under stats, will show association command paths found in wincmd.ini
- Clicking on the "problems" found label will bring up all commands checked in a list (not just the problems), but the command field in column 0 has been attempted stripped of parameters in the cmd field
- Clicking on the various plugin types or nr's for packer, lister, content and filsystem plugins, will display all on system (look under "other problems" to list the plugins with issues)

The ambition of this project is to make it a helpful tool for anybody that are a bit extra interested in customizing Total Commander. It is work in progress, and there is much to come still.

I'll give a short description of the buttons below, starting with the ones that has a finished GUI:

[Cmd path]: Displays a list of commands that can't be found. You'll be given the option to mark commands for deletion, and delete them, if you wish.

[Dupe]: Displays a list of duplicate commands. You may mark commands for deletion here too. (all existing duplicates are listed, so keep at least one of them, unless you really want to delete all instances.)

[Menu cmd]: Displays a list of menu additions that are pointing to commands that no longer exist in the menu .ini or in usercmd.ini. You may choose to delete menu lines within this GUI. It will only affect the currently loaded menu in Total Commander.

[Add menu]: Displays a list of commands in usercmd.ini and the menu .ini that has not yet been added to the menu. Giving you the option to add them to your menu. It displays 3 dropdown menus at the bottom of the GUI. The first is to select the submenu location to add the new menu items. (if you are using a custom menu like the one made by Petermad: https://ghisler.ch/board/viewtopic.php?t=33740 ) The second dropdown menu is to choose if the new additions are to be placed at the bottom or the top of that seleted submenu. The third is to choose the menu .mnu file to add to. If you have specified the path to your .mnu file with the environment variable %PROCESSOR_ARCHITECTURE% you'll have 4 options: Saving to the current menu, the other menu, both menus at the same time or to clipboard.

[Merge ini]: Displays a list of bar buttons that have the same content as commands stored in usercmd.ini or the menu .ini. Enabling you to make the bar buttons point to the user or menu commands instead. Which is better, as you'll only have to administer the command in one location.

[TC sel.->Buttons]: If you within Total Commander first select a few executables. (Branch view with CTRL+B is recommended for this procedure, to allow adding a lot at once). Followed by pressing the button [TC sel.->Buttons]. A fileopen dialog appears; choose which buttonbar file to append, or save as a new buttonbar. A list will occur displaying all executables. All boxes are editable. So you can change description, parameters, etc. before eventually generating a buttonbar containing the selected commands. Screenshot of GUI: Image: https://picload.org/image/rliwaopw/tccmdverify_v019002.jpg
In the above example screenshot I generate a buttonbar consisting of 318 NirSoft programs. Only executables not already added to your TC setup will be marked by default, but you may add them again if you choose to.


The following GUI-buttons are work in progress and wont make any changes to your Total Commander setup yet, but they do display lists (with _arraydisplay) containing various information about your setup:

[Icon path]: Displays a list of commands having non existing icon paths.

[Start path]: Displays a list of commands having non existing start paths.

[Env. var.]: Displays a list of commands where Total Commanders full path is used rather then the %COMMANDER_PATH% environment variable.

[Cmd "]: Displays a list of commands with incorrect quotation marking. The default is to think that a portable Total Commander installation may move to a folder with spaces in it at some point. So therefore commands with TC's environment variable is also reported here if quotes hasn't been used. This behaviour may be disabled in the options.

[Param "]: Displays a list of commands for which there may be quotation trouble in the parameters.

[Add to ini]: Displays a list of buttonbar commands that has not yet been added to usercmd.ini or the currently loaded menu .ini. Tho add this automagically is a feature I'm eager to implement soon, so it will likely be in a version that is soon to come.

[Other]: Lists various other problems with TC's setup files.

[Settings]: Settings for tcCmdVerify, like font type and size.


Download links:
Download tcCmdVerify
Download tcCmdVerify (compressed with upx)
Download Autoit source code

If you run this outside of Total Commander it will complain about this and offer to add itself to your TC buttonbar.
If ran within Total Commander it will not ask to add itself, but if you want a button for it just drag & drop it to your buttonbar, no parameters.
Last edited by magz on 2018-06-10, 21:13 UTC, edited 52 times in total.

jmwap
Member
Member
Posts: 108
Joined: 2008-03-23, 12:40 UTC

Post by *jmwap » 2015-10-18, 09:38 UTC

Great tool, thanks.

It reports "command path not found" for things like:
OPENTABS %SOME_VAR%\..\tctabs.tab|C:\totalcmd\usercmd.ini|em_mm_opentabs_file|cmd
but I the path is correct, is it due to the OPENTABS?
thanks

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-18, 10:47 UTC

jmwap wrote:Great tool, thanks.

It reports "command path not found" for things like:
OPENTABS %SOME_VAR%\..\tctabs.tab|C:\totalcmd\usercmd.ini|em_mm_opentabs_file|cmd
but I the path is correct, is it due to the OPENTABS?
thanks
Thanks for testing! I was worried I made something only I would find useful again. (I usually do).
It's fun to have user(s). :)

Is %SOME_VAR% an environment variable on your system?
I haven't seen that env var before.
Can you copy & paste this as a toolbar button and run it please?

Code: Select all

TOTALCMD#BAR#DATA
cmd
/k set
%COMMANDER_EXE%
List environment variables TC can see.

0
-1
Does it list SOME_VAR among the environment variables found within TC?

It should not be due to the TC OPENTABS as I've made some quirky workaround for that and a couple of other internal TC commands, stripping them from cmd path before checking. You can see if it was stripped correctly or not if pressing the banner text to the top left: "problems to fix", all found commands should be listed there, and column 0 should contain only the path's. (Not a very intuitive place to list all commands found, but it's for bug-testing purposes.)

I also notice the toolbar path is relative as well as with an environment variable? That should work, but I haven't testet it on my system yet, so I may have overlooked something due to that.

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

Post by *Vochomurka » 2015-10-18, 14:54 UTC

1) Please see the screenshot: Image: http://imagehost.spark-media.ru/i4/B11D933A-E497-8518-DC1B-98A23CC6CC43.jpg Can you make buttons wider?

2) BAR commands like

Code: Select all

cmd3=LOADSEARCH
param3=Search template
are treated as errors being really valid. Generally, please consider commands with arguments like MULTIRENAME and SYNCOPEN;

3) Chain commands like

Code: Select all

cm_SrcByDateTime,cm_GoToFirstFile,cm_SrcByName
must be also treated as valid;

4) CLSID paths like

Code: Select all

cd ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
should be treated as valid either;

5) "-2" is a line break in button bars. Why all "-2"'s are listed as errors?

Anyway, thank you for your work. Useful tool

jmwap
Member
Member
Posts: 108
Joined: 2008-03-23, 12:40 UTC

Post by *jmwap » 2015-10-18, 15:56 UTC

Is %SOME_VAR% an environment variable on your system?
Yes of course, I had edited it, but it is a valid env var.
Can you copy & paste this as a toolbar button and run it please?

Code: Select all

TOTALCMD#BAR#DATA
cmd
/k set
%COMMANDER_EXE%
List environment variables TC can see.

0
-1
Does it list SOME_VAR among the environment variables found within TC?
I don't have a toolbar so I don't know how to test that. But for sure TC sees my envvar, as I use it in my commands all the time and works.

It should not be due to the TC OPENTABS as I've made some quirky workaround for that and a couple of other internal TC commands, stripping them from cmd path before checking. You can see if it was stripped correctly or not if pressing the banner text to the top left: "problems to fix", all found commands should be listed there, and column 0 should contain only the path's. (Not a very intuitive place to list all commands found, but it's for bug-testing purposes.)
column 0 still contains OPENTABS in there...
I also notice the toolbar path is relative as well as with an environment variable? That should work, but I haven't testet it on my system yet, so I may have overlooked something due to that.
yes, correct, envvar and relative. This should be no problem

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-20, 08:38 UTC

Thanks for testing and reporting the bugs my fellow TC fanboys.
A great bonus for me is you guys teaching me about TC tweaks my script fails on due to me being ignorant about them. Cheers.

v0.02 has just been uploaded.
Please check it out. (if you have a lot of commands in need of checking)
Vochomurka wrote:1) Please see the screenshot: Image: http://imagehost.spark-media.ru/i4/B11D933A-E497-8518-DC1B-98A23CC6CC43.jpg Can you make buttons wider?
Hmm, looks like the font is to big. I used Helvetica 10 on most of the text but Helvetica 9 for those buttons. Are they the same text size as the rest of the GUI?
I can make them wider, but I figured it was false advertising with the "fix" part of the buttons, at least yet, so I removed that. The text should fit now.
Vochomurka wrote:2) BAR commands like

Code: Select all

cmd3=LOADSEARCH
param3=Search template
are treated as errors being really valid. Generally, please consider commands with arguments like MULTIRENAME and SYNCOPEN;
Yeah I forgot to add these, the check should skip those commands now.
Vochomurka wrote:3) Chain commands like

Code: Select all

cm_SrcByDateTime,cm_GoToFirstFile,cm_SrcByName
must be also treated as valid
I didn't know we could do this. Only for internal commands though? Must be, as we can have commas in program and script path names (it's not recomended of course however).
Can we chain commands with commands from usercmd.ini as well?
Or program exes combined with internal chain commands?
I'm guessing not, but it was cool to learn that internal commands can be chained like that.
I wrote a loop checking through all the internal commands (it will for now only do this for internal commands due to my above assumption), if all commands are found in totalcmd.inc it doesn't mark it as not found anymore.
Vochomurka wrote:4) CLSID paths like

Code: Select all

cd ::{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}
should be treated as valid
I set the script to skip checking for existance when the command line starts with "cd ::{" now (from v0.02), but I'm thinking I perhaps should do a check for them.
HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F02C1A0D-BE21-4350-88B0-7367FC96EF3C}\InProcServer32
seems to hold the info (it's pointing to %systemroot%\system32\NetworkExplorer.dll) so I should add a check which verifies this after checking the registry. But for now I set the script to just skip checking them.
Vochomurka wrote:5) "-2" is a line break in button bars. Why all "-2"'s are listed as errors?
Because I didn't know we could split the button bars like that. I like it though. The script should skip checking them from v0.02.

jmwap wrote:column 0 still contains OPENTABS in there...
Yeah I had forgotten to strip that it turns out, should be fixed now.
A smart trick to have the tabs like that, I may do the same for switching between work and home folder tabs.

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-20, 10:31 UTC

I just noticed I forgot to allow relative paths to Icons in windows or system32 folders, so v0.03 has been uploaded, fixing that.

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

Post by *Vochomurka » 2015-10-20, 19:56 UTC

1) Buttons are fully visible now - thanks;
2) Valid strings listed as errors, "Cmd path" section:

Code: Select all

%COMMANDER_EXE% /O /T /S /L=%USERPROFILE%|c:\Utils\totalcmd\ANSYS.BAR|Buttonbar|button5
%COMMANDER_EXE% /O /S=L %USERPROFILE%\file.err|c:\Utils\totalcmd\ANSYS.BAR|Buttonbar|button6
cm_VisButtonbar;cm_VisButtonbar|c:\Utils\totalcmd\ChainCommand.BAR|Buttonbar|button5
909,305,2903|c:\Utils\totalcmd\ChainCommand.BAR|Buttonbar|button7
%WINDIR%\System32\rundll32.exe devmgr.dll DeviceManager_Execute|c:\Utils\totalcmd\Commands.BAR|Buttonbar|button5
%Comspec% /k CHKDSK e: /F|c:\Utils\totalcmd\Commands.BAR|Buttonbar|button11
%COMMANDER_DRIVE%\Utils\PowerPro\powerpro.exe *script runfile CopyComment=|c:\Utils\totalcmd\FileComments.bar|Buttonbar|button3
OPENBAR %COMMANDER_DRIVE%\Storage\TNB\_local.bar|c:\Utils\totalcmd\LocalButtonBars.bar|Buttonbar|button6
http://www.nirsoft.net/|c:\Utils\totalcmd\NirSoft.BAR|Buttonbar|button1
%ProgramFiles%\360\360WangPan\360WangPan.exe|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|button28
cd %ProgramFiles%\360\360WangPan|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|button29
%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe /c "PowerPro"|c:\Utils\totalcmd\OpenWith.bar|Buttonbar|button3
d:\user\Batches\Translate.cmd|c:\Utils\totalcmd\Translit.bar|Buttonbar|button17
%COMMANDER_DRIVE%\Utils\Tray\USBSafe\usr.exe stop -d|c:\Utils\totalcmd\USBSafelyRemove.BAR|Buttonbar|button5
%COMMANDER_DRIVE%\Utils\PowerPro\powerpro.exe *script runfile TreeDown=|C:\Utils\TotalCmd\usercmd.ini|em_TreeDown|cmd
SELECTFILES 1-2-*.cdr|C:\Utils\TotalCmd\usercmd.ini|em_Defense21|cmd
3) The same, "Cmd" section:

Code: Select all

%COMMANDER_PATH%\ScriptsWithBee.bar|c:\Utils\totalcmd\3rdPartyPlugins.bar|Buttonbar|button1
%COMMANDER_EXE% /o /S=L|c:\Utils\totalcmd\Archive.bar|Buttonbar|button4
cmd /c echo y | del *.*|c:\Utils\totalcmd\Delete.bar|Buttonbar|button1
OPENTABS %COMMANDER_PATH%\Tabs\Garmin.tab|c:\Utils\totalcmd\Garmin.bar|Buttonbar|button1
OPENLANGUAGEFILE WCMD_rus.LNG|c:\Utils\totalcmd\Language.BAR|Buttonbar|button4
%COMMANDER_PATH%\Lister\lister.exe|c:\Utils\totalcmd\Lister.bar|Buttonbar|button2
%COMMANDER_EXE% /s=l:Pxbaseview|c:\Utils\totalcmd\Lister.bar|Buttonbar|button12
cd %COMMANDER_PATH%\LogFile|c:\Utils\totalcmd\LogView.BAR|Buttonbar|button6
%COMMANDER_PATH%\Commands.BAR|c:\Utils\totalcmd\Misc.bar|Buttonbar|button1
OPENTABS %COMMANDER_PATH%\Tabs\TC.tab|c:\Utils\totalcmd\Tabs.bar|Buttonbar|button7
%COMMANDER_PATH%\TCFS\TCFS2.exe|c:\Utils\totalcmd\TCFS.BAR|Buttonbar|button5
4) The same, "Param" section:

Code: Select all

%P %T /T|c:\Utils\totalcmd\AdvancedCopy.bar|Buttonbar|button1
%P%N %T%M|c:\Utils\totalcmd\Compare.bar|Buttonbar|button21
In fact, due to your tool, I've already found a lot of obsolete, dead, improper and invalid entries in my bars and commands! Thank you again!

User avatar
Xnor
Junior Member
Junior Member
Posts: 80
Joined: 2009-04-17, 10:55 UTC

Post by *Xnor » 2015-10-21, 06:20 UTC

First of all I really like that tool. Thanks to it I found several issues.


v. 0.03
I found few issues in your tool.

1. Command paths pre-leading with a star (* - indicating that the command should be started as admin) aren't detected correctly, e.g.:
*"%COMMANDER_PATH%\<path>\Notepad++Portable.exe"

2. I am using an extended language pack. It contains several files (.inc, .lng, .mnu, .ini). The ini-file contains a lot of different commands, e.g.:
[em_ext_mydesktop]
cmd=cd %$DESKTOP%
menu=My Desktop (personal)
If I use one of them in my button bar your tool states that the command is not correct (command paths not found). I add the ini-file and the directory to the list below in your tool.


I would love to suggest some additional features/changes:

1. support for command line parameters for the tool itself, e.g.:
tcCmdVerify_x64.exe -i usercmd.ini

2. storage of settings into an ini-file
- the list of additional paths
- lastly used usercmd.ini

3. Change name of columns to something meaningful


I also got a question:
If I click at the label at the top "xx problems to fix:" what exactly does the list show or should show? The total count of current issues?
#201591 Single user licence

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-23, 04:55 UTC

tcCmdVerify v0.04 is up
And I am sorry, but I am to tired atm. to type much info, and will get back to replying to your posts Vochomurka and Xnor, thanks for the nice feedback and testing.

I have tried to fix most of what you ask for, except a couple of things, which I will come back to soon.

tcCmdVerify now reads the commands in the language ini file for extended menus.

You may use the following parameters for tcCmdVerify if you want to test a new feature:
To check within both the button bars and the language ini: /D
To check the buttons in the button bars: /B
To check within in the language ini: /L

A list of commands found in both button bars/language ini and usercmd.ini will then be displayed when the program starts.
Be warned that my dupe check is slow and in need of improvement.

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-25, 04:38 UTC

v0.05 has been uploaded.
It has a great speed increase on the dupe check (which was new from v0.04, see my previous comment), that check is about 50 times as quick in v0.05 as in v0.04

It also has some fixes on detecting cmd paths with missing quotes.

Slightly better info in the arrays (correct section and key names when pressing the buttons. Menu .ini and usercmd.ini arrays shown when pressing their stats numbers now also shows parameters and cmd paths.)
Vochomurka wrote:"Cmd path" section:

Code: Select all

%COMMANDER_EXE% /O /T /S /L=%USERPROFILE%|c:\Utils\totalcmd\ANSYS.BAR|Buttonbar|button5
%COMMANDER_EXE% /O /S=L %USERPROFILE%\file.err|c:\Utils\totalcmd\ANSYS.BAR|Buttonbar|button6
909,305,2903|c:\Utils\totalcmd\ChainCommand.BAR|Buttonbar|button7
%WINDIR%\System32\rundll32.exe devmgr.dll DeviceManager_Execute|c:\Utils\totalcmd\Commands.BAR|Buttonbar|button5
http://www.nirsoft.net/|c:\Utils\totalcmd\NirSoft.BAR|Buttonbar|button1
SELECTFILES 1-2-*.cdr|C:\Utils\TotalCmd\usercmd.ini|em_Defense21|cmd
I fixed these in v0.04, the rundll with full path was fixed in v0.05


I don't understand why these where detected as missing, does it still happen in v0.05?:

Code: Select all

OPENBAR %COMMANDER_DRIVE%\Storage\TNB\_local.bar|c:\Utils\totalcmd\LocalButtonBars.bar|Buttonbar|button6
OPENTABS %COMMANDER_PATH%\Tabs\TC.tab|c:\Utils\totalcmd\Tabs.bar|Buttonbar|button7
cd %COMMANDER_PATH%\LogFile|c:\Utils\totalcmd\LogView.BAR|Buttonbar|button6
%ProgramFiles%\360\360WangPan\360WangPan.exe|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|button28
cd %ProgramFiles%\360\360WangPan|c:\Utils\totalcmd\OnlineDrive.BAR|Buttonbar|button29
d:\user\Batches\Translate.cmd|c:\Utils\totalcmd\Translit.bar|Buttonbar|button17


I think tcCmdVerify did correctly in reporting these as missing:
(Because there is a ; instead of a , in the first chained command
and there are parameters in the command field for the 2 others)

Code: Select all

cm_VisButtonbar;cm_VisButtonbar|c:\Utils\totalcmd\ChainCommand.BAR|Buttonbar|button5
%Comspec% /k CHKDSK e: /F|c:\Utils\totalcmd\Commands.BAR|Buttonbar|button11
%COMMANDER_DRIVE%\Utils\Tray\USBSafe\usr.exe stop -d|c:\Utils\totalcmd\USBSafelyRemove.BAR|Buttonbar|button5

I'm not familiar with powerpro, is there a reason for having those parameters in the cmd field?:

Code: Select all

%COMMANDER_DRIVE%\Utils\PowerPro\powerpro.exe *script runfile CopyComment=|c:\Utils\totalcmd\FileComments.bar|Buttonbar|button3
%COMMANDER_DRIVE%\Utils\Text\EmEditor\emeditor.exe /c "PowerPro"|c:\Utils\totalcmd\OpenWith.bar|Buttonbar|button3
%COMMANDER_DRIVE%\Utils\PowerPro\powerpro.exe *script runfile TreeDown=|C:\Utils\TotalCmd\usercmd.ini|em_TreeDown|cmd

These cmd's wrongfully reported as cmd paths missing quotes should be corrected from v0.04:

Code: Select all

OPENLANGUAGEFILE WCMD_rus.LNG|c:\Utils\totalcmd\Language.BAR|Buttonbar|button4
%COMMANDER_EXE% /o /S=L|c:\Utils\totalcmd\Archive.bar|Buttonbar|button4
%COMMANDER_EXE% /s=l:Pxbaseview|c:\Utils\totalcmd\Lister.bar|Buttonbar|button12

I think it did correct in listing these cmd paths as having missing quotes:
(tcCmdVerify is very strict by requiring quotes to be placed around cmd path if the TC environment variable %COMMANDER_PATH% was used.
To allow for running within a TC path with spaces.
And with the echo cmd, it gets confused because of the parameters,
which should be placed in the parameter field imho.)

Code: Select all

%COMMANDER_PATH%\ScriptsWithBee.bar|c:\Utils\totalcmd\3rdPartyPlugins.bar|Buttonbar|button1
cmd /c echo y | del *.*|c:\Utils\totalcmd\Delete.bar|Buttonbar|button1
OPENTABS %COMMANDER_PATH%\Tabs\Garmin.tab|c:\Utils\totalcmd\Garmin.bar|Buttonbar|button1
%COMMANDER_PATH%\Lister\lister.exe|c:\Utils\totalcmd\Lister.bar|Buttonbar|button2
%COMMANDER_PATH%\Commands.BAR|c:\Utils\totalcmd\Misc.bar|Buttonbar|button1
%COMMANDER_PATH%\TCFS\TCFS2.exe|c:\Utils\totalcmd\TCFS.BAR|Buttonbar|button5
Parameters missing quotes, I think it was correct in reporting these, but am not sure:

Code: Select all

%P %T /T|c:\Utils\totalcmd\AdvancedCopy.bar|Buttonbar|button1
%P%N %T%M|c:\Utils\totalcmd\Compare.bar|Buttonbar|button21
I'm thinking the correct parameters should be:
"%P" "%T" /T
%P%N "%T%M"

But like I said I'm not sure. On the %T I know we need quotes around it.
%P%N it'll be automatically wrapped in quotes if necessary, but for %T%M I don't know. I guessed it was needed. Not sure if a single %P should have quotes around it either or if TC automatically adds that.
Other such parameters I wonder if should have quotes around them are:
%T%R %T%S1

Xnor wrote:1. Command paths pre-leading with a star (* - indicating that the command should be started as admin) aren't detected correctly, e.g.:
*"%COMMANDER_PATH%\<path>\Notepad++Portable.exe"
I didn't know we could do this.
Always running as admin myself.
Should now be fixed (from v0.04)
Xnor wrote:2. I am using an extended language pack. It contains several files (.inc, .lng, .mnu, .ini). The ini-file contains a lot of different commands, e.g.:
[em_ext_mydesktop]
cmd=cd %$DESKTOP%
menu=My Desktop (personal)
If I use one of them in my button bar your tool states that the command is not correct (command paths not found). I add the ini-file and the directory to the list below in your tool.
I fixed this in v0.04
also adding the commands in the extended menu to the scan.
I also have plans to make a check for the commands listed in the menu file, a check for if they exist in the menu .ini or usercmd.ini
(Probably implemented in a version coming soon)
Xnor wrote:I would love to suggest some additional features/changes:

1. support for command line parameters for the tool itself, e.g.:
tcCmdVerify_x64.exe -i usercmd.ini

2. storage of settings into an ini-file
- the list of additional paths
- lastly used usercmd.ini
This sounds easy to implement, but please help me understand why you have several usercmd.ini files? From v0.04 tcCmdVerify scans the extended menu .ini, so maybe thats the ini you wanted parameters to select? If so, it's not so useful after v0.04 I figure?

Saving the paths for folders selected to search within?
ok, that can be done easily, although the editbox listing those folders does nothing yet.
I'll implement that when I've made it more useful.
Xnor wrote:3. Change name of columns to something meaningful
The info displayed is the way it is due to me being lazy on the GUI code still, as I don't want to make my code messy with too much GUI before I feel like I've got the fault detection right. I just display the contents of some arrays with a simple autoit function called _arraydisplay()
I have added some info to row 0 for most of the arrays displayed from v0.05.
Xnor wrote:I also got a question:
If I click at the label at the top "xx problems to fix:" what exactly does the list show or should show? The total count of current issues?
I understand why it's confusing, but it's just there for bug testing purposes during development.
It lists all commands found on your system.
column 0 lists a stripped version of the command line.
internal commands are stripped for cases like APPENDTABS, OPENTABS, OPENLANGUAGEFILE etc. so that it should hold only the path to the .tabs file, language file or executable to check for existance of.
Column 1 lists the path to the bar file or ini file with the commands.
Column 2 lists section names
Column 3 lists key names

The section and key names are intended for tcCmdVerify later to understand exactly where to do changes in TC ini files and button bars.
For now, until I get a proper GUI going it works ok for human reading I figure.

User avatar
Xnor
Junior Member
Junior Member
Posts: 80
Joined: 2009-04-17, 10:55 UTC

Post by *Xnor » 2015-10-25, 05:37 UTC

magz wrote:
Xnor wrote:I would love to suggest some additional features/changes:

1. support for command line parameters for the tool itself, e.g.:
tcCmdVerify_x64.exe -i usercmd.ini

2. storage of settings into an ini-file
- the list of additional paths
- lastly used usercmd.ini
This sounds easy to implement, but please help me understand why you have several usercmd.ini files? From v0.04 tcCmdVerify scans the extended menu .ini, so maybe thats the ini you wanted parameters to select? If so, it's not so useful after v0.04 I figure?
Lets postpone the ini file feature.

Concerning the command line parameters, I did a mistake there. I worte usercmd.ini instead of wincmd.ini. I ofc mean the main settings file I need to open at the very beginning of the tool. Btw. in the opening dialog there is "usercmd.ini" written in the header text and the extension descriptor which confused me :). I did rename the wincmd.ini to settings.ini so I didn't remember the default name.
https://picload.org/image/poirwwi/open_dialog.png

I just want to have the possibility to create a button and specify the path to the ini. So while starting the tool directly analyses it.
So I could have something like that:

Code: Select all

[em_tcCmdVerify]
button=%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\tcCmdVerify_x64.exe
cmd=""%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\tcCmdVerify_x64.exe" "%commander_ini%""
path=%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\
menu=tcCmdVerify

Is your tool following the "RedirectSection" wincmd.ini entries?
e.g.:

Code: Select all

[Extensions]
RedirectSection=%COMMANDER_PATH%\..\TotalCMA\Ini-File\Extensions.ini
#201591 Single user licence

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-25, 06:56 UTC

Xnor wrote:Concerning the command line parameters, I did a mistake there. I worte usercmd.ini instead of wincmd.ini. I ofc mean the main settings file I need to open at the very beginning of the tool. Btw. in the opening dialog there is "usercmd.ini" written in the header text and the extension descriptor which confused me :). I did rename the wincmd.ini to settings.ini so I didn't remember the default name.
https://picload.org/image/poirwwi/open_dialog.png
oh the TC ini settings file has been renamed. Thats why tcCmdVerify asks for it's location, it's doing a search first at common locations, if not %COMMANDER_INI% is found. So I guess the TC environment variable %COMMANDER_INI% does not work on your system due to wincmd.ini being renamed to settings.ini, and then my function looks for it, but it expects a settings file named wincmd.ini.
You will get into trouble with other scripts and plugins with such a settings name, but a workaround could be to make a symbolic link or a hardlink called wincmd.ini pointing to settings.ini.
Xnor wrote:I just want to have the possibility to create a button and specify the path to the ini. So while starting the tool directly analyses it.
So I could have something like that:

Code: Select all

[em_tcCmdVerify]
button=%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\tcCmdVerify_x64.exe
cmd=""%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\tcCmdVerify_x64.exe" "%commander_ini%""
path=%COMMANDER_PATH%\..\TotalCMC\TCTools\TC Cmd Verify\
menu=tcCmdVerify
It's cool, I just uploaded v0.06, with this feature.
usage: tcCmdVerify_x64.exe /I [path to wincmd.ini (your settings.ini)]
f.ex:
cmd: tcCmdVerify_x64.exe
parameters: /I "%COMMANDER_PATH%\settings.ini"

place /I and the path as parameters in the button unless you want tcCmdVerify to bitch about broken links and missing quotes in it's next scan though. ;)
Xnor wrote:Is your tool following the "RedirectSection" wincmd.ini entries?
e.g.:

Code: Select all

[Extensions]
RedirectSection=%COMMANDER_PATH%\..\TotalCMA\Ini-File\Extensions.ini
My script does not, not even in v0.06, but thanks for letting me know.
I will make it follow the redirection. (probably from v0.07)

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

Post by *Vochomurka » 2015-10-25, 07:44 UTC

there are parameters in the command field for the 2 others
Yes, there are. Do you personally treat this as an error?
I'm not familiar with powerpro, is there a reason for having those parameters in the cmd field?
Yes, there is. When the command starts with PowerPro.exe path and ends with "=", the parameter is assigned to a special PowerPro variable x9

User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz » 2015-10-26, 00:05 UTC

tcCmdVerify v0.07 is up
Changes:
- Now follows RedirectSection if that key is in the extension or associations of wincmd.ni
- Better handling of the parameters following the executable in the command field.
- More (and better?) debug information when pressing the "?? Problems to fix" label.
Xnor wrote:Is your tool following the "RedirectSection" wincmd.ini entries?
e.g.:

Code: Select all

[Extensions]
RedirectSection=%COMMANDER_PATH%\..\TotalCMA\Ini-File\Extensions.ini
It does now from v0.07

Vochomurka wrote:
there are parameters in the command field for the 2 others
Yes, there are. Do you personally treat this as an error?
Well I just find it a bit messy, but as Total Commander supports it I will do my best to make tcCmdVerify handle these parameters in the command field better. I've made a loop now, stripping the last parameters one by one, while checking for file existance each time for all commands it can't find which also has spaces in them.
I also changed the array displayed when pressing the "problems to fix" label. It now also shows the parameter field, as well as the command field split in 3 for the cases that was needed (the commands preceeding the cmd path (like cmd /k or java -jar), the path to the command executable we check for existance of, and parameters following the cmd path)
Vochomurka wrote:
I'm not familiar with powerpro, is there a reason for having those parameters in the cmd field?
Yes, there is. When the command starts with PowerPro.exe path and ends with "=", the parameter is assigned to a special PowerPro variable x9
I haven't tried at home but I think the above mentioned parameter stripper should work for powerpro as well, from v0.07. :)

Post Reply