Page 1 of 1
Ignore "CompareTool=" if TC is called with /S=C
Posted: 2013-12-17, 23:13 UTC
by HolgerK
The reason behind this is to run the compare as a separate process.
Add the following line to the wincmd.ini [Configuration]-section.
CompareTool=%COMMANDER_EXE% /S=C
Start a compare between two files:
Code: Select all
---------------------------
Total Commander
---------------------------
File not found!
"C:\Tools\totalcmd\TOTALCMD64.EXE /S=C"
---------------------------
OK
---------------------------
also explicitly quoted
CompareTool="%COMMANDER_EXE%" /S=C
failed.
This time with an endless loop TC calling TC calling TC calling TC...
Only way to stop this was command line with:
It seems that the one possible way is to use
CompareTool="%COMMANDER_EXE%" /I=null /S=C
but all settings for the compare tool are default in this case.
Is it possible to ignore the "CompareTool=" wincmd.ini setting if TC is called with parameter "/S=C"?
I guess everyone using "/S=C" as parameter would like to use TC and not windiff or any other comparer defined as CompareTool inside TC.
Regards
Holger
Posted: 2013-12-18, 11:44 UTC
by MVV
Wow, recursion is funny.

I found another way to stop it: I edited
CompareTool key and saved
wincmd.ini.

Posted: 2013-12-18, 14:03 UTC
by white
Confirmed using TC8.01 32bit.
I added to wincmd.ini: CompareTool="%COMMANDER_EXE%" /S=C
Tested OK using TC8.50b12 32bit. Except when files are equal. If the files are equal, I get a message saying the two files have the same contents. After I click OK in that message window, I get an AV error.
---------------------------
Application Error
---------------------------
Exception EAccessViolation in module TOTALCMD.EXE at 0000B934.
Access violation at address 0040CB74. Write of address 00000010.
---------------------------
OK
---------------------------
Posted: 2013-12-18, 16:47 UTC
by ghisler(Author)
Sorry, this isn't supported. also %COMMANDER_EXE% isn't even defined outside of TC.
Posted: 2013-12-18, 18:06 UTC
by Horst.Epp
ghisler(Author) wrote:Sorry, this isn't supported. also %COMMANDER_EXE% isn't even defined outside of TC.
Thats not outside of TC !
They use it from inside of TC by defininig the Compare tool.
Posted: 2013-12-18, 18:49 UTC
by white
Tested OK using TC8.50b13 32bit.
Posted: 2013-12-18, 20:53 UTC
by HolgerK
ghisler(Author) wrote:Sorry, this isn't supported.
Yes, that's why i placed this under TC-Suggestions.
also %COMMANDER_EXE% isn't even defined outside of TC.
Yes, but usable inside wincmd.ini.
I will play a little bit with the /I= parameter to get an acceptable working solution for me, but i still think an easy configurable separate process for TC's compare window called via "
Files->Compare by content" is something that is worth to think about.
- The compare window in edit mode would not be forced to closed if the TC main instance terminates.
- Comparing of large files (x86) would not be influenced by the memory consumption of the main instance.
Regards
Holger
Posted: 2013-12-19, 06:10 UTC
by MVV
Let me add one:
- If some plugin like Imagine does hard work in a foreground, separate compare window wont't hang.
I think there is no much sense in reading CompareTool option in case of /S=C parameter because it is much faster to call external compare tool directly instead of starting it via separate TC instance.
So I support request to ignore CompareTool option in case of /S=C parameter.
Posted: 2013-12-19, 08:56 UTC
by white
2HolgerK
2MVV
I see no problem when using TC8.50b13 32bit. Have you tried this 32 bit version?
Posted: 2013-12-19, 09:03 UTC
by MVV
Yes, I'm using TC 8.50b13x32.
Posted: 2013-12-19, 09:11 UTC
by HolgerK
white wrote:Have you tried this 32 bit version?
Yes.
Both versions ends up in a recursive call.
The only difference i see is that the x64 version took a while to terminate after creating the next instance (lot of totalcmd64.exe processes visible in taskmager).
Regards
Holger
Posted: 2013-12-19, 14:12 UTC
by ghisler(Author)
You could use a different ini file for the compare tool:
CompareTool=%COMMANDER_EXE% /i=c:\totalcmd\other.ini /S=C
Posted: 2013-12-19, 16:49 UTC
by white
white wrote:2HolgerK
2MVV
I see no problem when using TC8.50b13 32bit. Have you tried this 32 bit version?
OK, I can confirm it now. I started the beta with /I parameter. That's why I couldn't confirm the problem. The TC instance started with
"%COMMANDER_EXE%" /S=C used my default ini file.
So, indeed one need to specify a different ini file. Alternatively a command line parameter could be implemented which overrides the setting in the ini file. For example similar to the /S=L:N (use internal lister), you could have /S=C:N (use internal compare tool).
Posted: 2013-12-25, 14:11 UTC
by HolgerK
history.txt wrote:22.12.13 Fixed: Compare by content: Ignore ini setting "CompareTool" when calling TC via parameter /S=C, to avoid infinite loops when CompareTool points again to Total Commander (32/64)
This works fine now without any recursion and all previous set custom settings.
Tested with TC850B14 (x64&x32).
Many thanks!
Holger
Posted: 2013-12-26, 12:02 UTC
by white
Tested OK using TC850b14 32bit.