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
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2magz

I still get false "command paths not found" for commands like these:

Code: Select all

OPENLANGUAGEFILE wcmd_pm_dan.lng
OPENLANGUAGEFILE
OPENLANGUAGEFILE .MNU
%COMMANDER_PATH%\LANGUAGE\wcmd_pm_dan.bar
%COMSPEC% /k set
%comspec% /k echo
lsplugin.ini
contplug.ini
cd %COMMANDER_PATH%\LANGUAGE\wcmd_ext_dan.zip
Stating the path is not required when using OPENLANGUAGEFILE

I get a false "broken menu links" for this line:

Code: Select all

;    MENUITEM "Gå til drev B:", 2062
But as you can see the line is commented out with a ; in front of it, so it should be skipped.
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
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Some planned features:

- I have neglected the Start menu commands, which can be found in the [User] section of wincmd.ini
So I will add them to the mix.
I guess I forgot because I stopped using them when I noticed a limit of 99 additions to the start menu, and started editing the excellent extended menu by PeterMad
- Selectable font for the GUI.
- As you may have guessed I'm planning to make the script automagically change/fix your TC settings.
- There is a backup feature I need to implement for that.
- I'm planning on squeezing some features for conversion into tcCmdVerify. Like conversion from buttonbars and start menu to usercmd.ini commands, with the option of linking from the old buttons to the created user commands. A difficulty I see here is generating names for all the usercmd.ini commands. What I've previously done with a simple script for my own use is making the script check for the highest nr em_usercmd# and adding numbers from that point. I'm guessing many want personalized names though (picky bastards) so I will have to sort that out somehow. Which means some GUI work.
- Detection of commands not used in the extended menu, with an offer to create a menu snip or copying contents of menu into clipboard, and loading the menu file in notepad, or chosen text editor, so that you may paste the menu contents into the menu at your chosen location.
- Making buttons (that doesn't already exist) from usercmd.ini/external commands maybe? Feels less useful perhaps.
- Checking for proper usage of environment variables in the parameter field. Perhaps not something we want tcCmdVerify to fix, as it seems complicated to know if environment variables will work in the parameters field or not. But to give it a chance of working we should report if double %% are used around environment variable paths in the parameters field. (requested by Vochomurka)

Vochomurka wrote: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
I see, I will make it possible to select a font then, by using parameter /F once or something like that. As it seems it doesn't find the arial and the helvetica fonts on your system. So it defaults to system default font, which is a bit to big to fit.
You should (in v0.10+) try to select a GUI font which is a bit smaller, I will make it possible to select the size as well. Should I make bold, italic or underline optional?

petermad wrote:

Code: Select all

%COMSPEC% /k set
%comspec% /k echo
As set and echo seems to be internal commands handled by %COMSPEC% and there is no executable (like ECHO.exe) for tcCmdVerify to find, that sh** happened, it should be easy to fix, just a bit of work as I figure I'll need to make a workaround for all internal commands which are: ASSOC, BREAK, CALL ,CD/CHDIR, CLS, COLOR, COPY, DATE, DEL, DIR, DPATH, ECHO, ENDLOCAL, ERASE, EXIT, FOR, FTYPE, GOTO, IF, KEYS, MD/MKDIR, MKLINK (vista and above), MOVE, PATH, PAUSE, POPD, PROMPT, PUSHD, REM, REN/RENAME, RD/RMDIR, SET, SETLOCAL, SHIFT, START, TIME, TITLE, TYPE, VER, VERIFY, VOL
According to good old ss64.com:
http://ss64.com/nt/syntax-internal.html
petermad wrote:I get a false "broken menu links" for this line:

Code: Select all

;    MENUITEM "Gå til drev B:", 2062
But as you can see the line is commented out with a ; in front of it, so it should be skipped.
I noticed the same, as I use your extended menus, it wouldn't have reported it if it was a working link being commented out (and I can even see the point in having 2 floppy drives in 2015 and later; to read Amiga floppys with the tool found on winuae.net) but that 2062 command isn't in totalcmd.inc so it wouldn't work if the comment was uncommented.
So I'm thinking iit's a good thing it gets reported.
I'm open for opinions on that however.
User avatar
petermad
Power Member
Power Member
Posts: 14795
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

but that 2062 command isn't in totalcmd.inc so it wouldn't work if the comment was uncommented.
That's not true - it works (provided that you do have a drive B) - Using a command's number always works, even if it is not listed in totalcmd.inc (provided that the command number is supported internally in TC - as 2062 is). Unlike using a cm_command - they HAVE to be listed in totalcmd.inc to work.

You can check out that command 2062 works by using Disk Management (diskmgmt.msc) to thange the drive letter for for example an usb-stick to B and running command 2026 - it will switch the current panel to drive B:.
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
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

tcCmdVerify v0.11

Post by *magz »

It has been a bit of a delay in updates from me, but I want to finish this, and I have had some time to improve tcCmdVerify lately, so here is v0.11.

I've improved the false positives reported earlier. There are a lot of bug fixes, speed improvments, and new speed slowdowns, due to more methods of checking. I added the time it takes to load tcCmdVerify in the title of the program, to the right of the program name. It now also has progress bars showing the loading progress. (2 of them, one for loading ini files, and another for the calculation process).

A settings gui has been made, with my experimental effort at adding support for selecting fonts. The font names are extracted from registry, but I don't know how to find what boldness or size each font supports, the name of the font itself is also a bit of guesswork some times, as it seems autoit some times prefers slightly other names for fonts then those listed in windows registry. Image: https://picload.org/image/rlldooaw/tcmdverify_003.jpg

New conditions it checks for:

- if double %% has been used around environment variables in the parameter field
- if the environment variable %PROCESSOR_ARCHITECTURE% is used in a 32 bit OS running on 64 bit CPU a warning will be displayed
- if there are commands in the toolbar that is not in the usercmd.ini file or the menu.ini
- if there are commands which have been saved in the ini files (usercmd.ini file or .ini that comes with the menu), and there is a equal toolbar button that 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

It now also checks the "Start" menu commands from the [user] section of wincmd.ini
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

v0.12

Post by *magz »

v0.12 has been uploaded.

It checks for some additional settings needed for the installation to be portable.
And it checks the plugins installed. (if the path to them in wincmd.ini is missing is the only check performed on plugins).

All of the above will be listed under "other errors".
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

0.14

Post by *magz »

v0.14 is up.

Changes:

There is now only one progress bar to show the loading time, and it shows up earlier. Added some info showing what stage tcCmdVerify is at in the loading process to the right of the % sign on the progress bar.

I didn't announce v0.13, but that was a bugfix release I did 4 hours after I released v0.12, it fixed a fault in the array holding the packer plugin paths, as that was displaying duplicate paths in v0.12.

I set the duplicate command scan to always run from v0.14.

There is a new feature in v0.14, in the "Add Menu" button:
Clicking "Add Menu" will offer to generate menu lines for the user commands and menu commands found in the .ini files that are not listed in the menu. (You will be asked first, pressing 'yes' places the generated menu lines in your clipboard, while pressing 'no' brings up the old array display. Pressing the label "in ini, not in menu" will also bring up the array display, but wont offer to generate a menu.)

I'll make it optional to add the menu lines to menus without this manual editing, I figure I'll need to make some GUI for making selections of what to add for that.
User avatar
Damel
Member
Member
Posts: 130
Joined: 2003-02-06, 01:11 UTC
Location: Prague, Czech Republic

Post by *Damel »

Today I downloaded yours interesting utility, but I got this error:
http://i.imgur.com/6TOt4IN.png
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Damel wrote:Today I downloaded yours interesting utility, but I got this error:
http://i.imgur.com/6TOt4IN.png
I figure this is probably due to my new progressbar thingy.
I'll soon put up a version without the progressbar in it so you can test if that works.

Edit:
On second thought. I am no longer so sure that it's the progressbar.
Could you please run the source code through autoit? So I'll see what line in the code the error occurs at?

Running it like such will provide more info about where in the code the error occurs:
"%PROGRAMFILES% (X86)\AutoIt3\AutoIt3_x64.exe" tcCmdVerify.au3

here is autoit:
https://www.autoitscript.com/site/autoit/
User avatar
Damel
Member
Member
Posts: 130
Joined: 2003-02-06, 01:11 UTC
Location: Prague, Czech Republic

Post by *Damel »

I will be happy to help you figure out what's wrong. Now I got this error:
http://i.imgur.com/cEHfoSZ.png

BTW:
https://virustotal.com/cs/file/c21aa98fe0016182ba863f22cf32703a54fcbf50fa00145a1a347c90607de4ea/analysis/1489478514/
https://virustotal.com/cs/file/ce525cc8964555dcd3115fd0e00c36adcd6874084775aa4776e4db5661d6ebf4/analysis/1489478527/
I hope that those are only false positive.

PS: I have not usercmd.ini, so what may I do: OK, Cancel, Close/Cross, make dummy file with 0 Bytes?
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Are you getting those results for the UPX compressed version?
If so I am using brute mode to compress them the smallest way.
brute mode tries 36 compression methods and selects the smallest.
My guess is that those less known antivirus tools simply react due to a slightly exotic compression method.
Damel wrote:PS: I have not usercmd.ini, so what may I do: OK, Cancel, Close/Cross, make dummy file with 0 Bytes?
I see, no worries, press cancel for now.
In a coming version of tcCmdVerify you'll be able to generate a usercmd.ini file from your toolbar buttons. As well as menu lines for each.

I think I fixed the problem in v0.15 which is uploaded now.
It has some error handling for when it tries to read sections of a Total Commander ini.
Let me know if that works please.
User avatar
Damel
Member
Member
Posts: 130
Joined: 2003-02-06, 01:11 UTC
Location: Prague, Czech Republic

Post by *Damel »

The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Damel wrote:No, for regular EXE's.

New scans for the new regular versions:
https://virustotal.com/cs/file/176dee8a13c5ac73fae642eac85257fd8d7bdb4b130fc3e76cea91793756586b/analysis/1489485156/
https://virustotal.com/cs/file/219390c5e7b9f6b15640af6ca45cb230deb2a9c9d610de9769038dc681a49bca/analysis/1489485169/

and new UPX versions:
https://virustotal.com/cs/file/5ff841bcc3508209a934c3a18325d6fd804e13a78992c449fcf075544e99750e/analysis/1489485238/
https://virustotal.com/cs/file/5ad2beba56e5707c46011bcadc4b48be64d5d0de5dfab76846d35f24a2d25884/analysis/1489485246/

In fact, I cannot download EXE versions in Firefox, they are blocked immediately. I must download packed files.

But good news at the end: Error is gone, your program works now:
http://i.imgur.com/pQpZ9CW.png

PS: As you can see on the screen... here will be more false alarms around. :-)
Sweet, thanks for the time spent testing.
I see that you've got 1570 problems to fix now.
tcCmdVerify is very strict at what it defines as problems. ;)

To bad with the exe versions being blocked, but I guess I played it safe by choosing 7z as the archive format. I guess a .zip might have gotten blocked too.
There will always be badly made antivirus tools producing false positives, but thanks for the report. It's practical for me to know, especially if it gets flagged by a popular antivirus tool.
Firefox blocking is pretty serious. Hope that is not a norm, I can download it with Firefox here. I'm using Eset Antivirus. What antivirus tool are you using? Any security plugin in firefox that blocks? Able to download .exe's elsewhere?
User avatar
Damel
Member
Member
Posts: 130
Joined: 2003-02-06, 01:11 UTC
Location: Prague, Czech Republic

Post by *Damel »

Only AV I have is Windows Defender on W10x64 (none AV plugin in FF). Files are blocked immediatelly after download and are deleted from the HDD. A bit strange is, that in Windows Defender history and quarantine is nothing about this.

Now I will go thru all problems and report you if there are false alarms. But at first I must clarify how many problems there actually really is!
tcCmdVerify.exe (LEFT) vs. tcCmdVerify_x64.exe (RIGHT)
http://i.imgur.com/2HUlRIa.png

I'm working on it.
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
User avatar
magz
Junior Member
Junior Member
Posts: 85
Joined: 2006-11-14, 10:47 UTC
Location: Norway

Post by *magz »

Damel wrote:Now I will go thru all problems and report you if there are false alarms. But at first I must clarify how many problems there actually really is!
tcCmdVerify.exe (LEFT) vs. tcCmdVerify_x64.exe (RIGHT)
http://i.imgur.com/2HUlRIa.png

I'm working on it.
Great! I need reports on false positives to improve the detection. :)

Interestingly there is a greater performance gain for you then for me with x64 vs x86. X64 is about 10% faster here.

Edit:
I now notice from your screens X64 seems to detect more missing paths and icon paths not found then the X86 version, that is weird. Same bar files scanned? Are there toolbars with paths using environment variables like %PROCESSOR_ARCHITECTURE% ?

Edit2:
I guess my speed comparison is not fair in your case, since you have to struggle with the fileopen dialog for a missing usercmd.ini file, and how fast you are at canceling it affects the timing displayed in the title.

But the difference in cmd path and icon missings makes me curious.
User avatar
Damel
Member
Member
Posts: 130
Joined: 2003-02-06, 01:11 UTC
Location: Prague, Czech Republic

Post by *Damel »

Now if I execute your utility I must only select proprietary BAR file (DEFAULT.BAR). Dialogs about selecting wincmd.ini or user.ini are not displayed in new version.

Your curiosity will be excited: x64 don't find just more problems... yes, x64 find some problems, that was not detected by x32 version, but x32 find some unique problems too! I will give detailed report later, now I have opened dialog box for my DEFAULT.BAR and I'm going from one button to another button and trying fix problems which are visible for my eyes. Then I will run you program again and give you that report. I have backups, so I can run program on older files if it will be needed.

Edit:
No I'm not using %PROCESSOR_ARCHITECTURE% variable.

I also must reread all pages in this thread, becouse there is a lot thing I don't understand now, e.g. why is there "command not in ini" and why are all buttons counted as error in "command not in ini" section.
The best solution:
1. format C:
2. install TotalCmd
3. install Windows (optionally)
Post Reply