[9.0 final] TC reports exe file corrupted for user config

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
tcfr2016
Junior Member
Junior Member
Posts: 2
Joined: 2016-12-04, 18:05 UTC

[9.0 final] TC reports exe file corrupted for user config

Post by *tcfr2016 »

Hello,
it seems there is a bug in handling user configurations.

TC started directly using just totalcmd.exe works fine.

When I copy configuration files to different directory and run TC with parameters "totalcmd.exe /i=<new_path>\_TC.ini /F=<new path>\_FTP.ini", TC crashes after several seconds with popup:

"WARNING: The TOTALCMD executable file is corrupted, possible VIRUS! Totalcmd will close. Please run a virus scanner as soon as possible!"

- Executable itself is not damaged; when I start again just totalcmd.exe without parameters, it runs normally
- Both 32bit and 64bit versions are affected
- Previous version 6.55 I've used until now is not affected, bug appeared later
- Configuration has just been copied from original configuration folder, not modified (but I expect I could modify configuration manually later)
- OS: Win 8.1/64bit

Could you please check the behaviour and fix it (or give an advice how to avoid the issue)?

Thank you.
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Where do you start TC from, or in other words where is your TC installed? Which working directory is used? I had the same problem 7 years ago with a ThinkPad special key and worked around it by using an AutoIt launcher. The issue itself arises from missing quotes if TC is launched from a path with spaces.

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
tcfr2016
Junior Member
Junior Member
Posts: 2
Joined: 2016-12-04, 18:05 UTC

Post by *tcfr2016 »

Dalai wrote:Where do you start TC from, or in other words where is your TC installed? Which working directory is used? I had the same problem 7 years ago with a ThinkPad special key and worked around it by using an AutoIt launcher. The issue itself arises from missing quotes if TC is launched from a path with spaces.

Regards
Dalai
Thank you for your response. Updating quotes really helped. Quotes weren't missing, but used in wrong format (they were part of path without filename):

set CFGPATH="d:\Some path"
totalcmd.exe /i=%CFGPATH%\TC.ini
...

which worked correctly for previous version of TC, but not for v9.0.

So this issue has been solved quite quickly, thank you :-)
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

tcfr2016 wrote:set CFGPATH="d:\Some path"
totalcmd.exe /i=%CFGPATH%\TC.ini
...
I recommend to avoid quotes in the assignment and to use them when using the variable instead. Example: Instead of

Code: Select all

set somepath="d:\Some path"
%somepath%\blahbla.exe
it's much better to use

Code: Select all

set somepath=d:\Some path
"%somepath%\blahblah.exe"
To work around issues with brackets within the assignment (%ProgramFiles(x86)% is the WORST variable MS has ever created!) it's even better to use something like this:

Code: Select all

set "somepath=d:\Some path"
"%somepath%\blahblah.exe"
The last one is the best and most universal thing to do. No more issues with quotes, brackets or stuff like this, and it works regardless of the variable's contents when quoting the variable itself when using it.
which worked correctly for previous version of TC, but not for v9.0.
The issue itself is quite old. I've dealt with it way back in TC 7.50. Everything worked in 7.0 but I suddenly got the same message after updating to 7.50.

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
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

What does the variable %commander_exe% contain?

Just write
echo %commander_exe%
on the command line above the F5, F6 buttons and press SHIFT+ENTER.
Author of Total Commander
https://www.ghisler.com
Post Reply