[TC 9.50 beta 12] wrong file version in EXE files

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
Martin_W
Junior Member
Junior Member
Posts: 9
Joined: 2016-09-03, 11:43 UTC
Location: Ludwigshafen

[TC 9.50 beta 12] wrong file version in EXE files

Post by *Martin_W »

The EXE file headers contain wrong "file version" entries. They say "9.5.0.0" instead of ""9.50.0.0".
This confuses software maintenance tools like SuMO. They suggest upgrading from 9.5 to 9.22 which would be a downgrade.

Steps to reproduce:
* right-Click on TOTALCMD.EXE or TOTALCMD64.EXE
* select "Properties" ("Eigenschaften")
* select the "Details" tab

Then you will see:
"File version" / "Dateiversion" reads 9.5.0.0 (incorrect)
"Product version" / "Produktversion" reads 9.50 (correct)

best regards / viele Grüße in die Schweiz
Martin W.
User avatar
Dalai
Power Member
Power Member
Posts: 9389
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *Dalai »

I'd say that's an issue with SuMo because the File Version of TC 9.22a is 9.2.2.1 (and that of TC 8.52a is 8.5.2.1).

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
Martin_W
Junior Member
Junior Member
Posts: 9
Joined: 2016-09-03, 11:43 UTC
Location: Ludwigshafen

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *Martin_W »

Hello Dalai,
thank you for the quick reply!

I have to disagree. SuMo gets it right for all other programs installed on my system.
Instead you might want to try Microsoft's own PowerShell:

Code: Select all

PS C:\Users\mw.XXXX> [System.Diagnostics.FileVersionInfo]::GetVersionInfo("c:\totalcmd\TOTALCMD.EXE").FileVersion
9.50

PS C:\Users\mw.XXXX> [System.Diagnostics.FileVersionInfo]::GetVersionInfo("c:\totalcmd\TOTALCMD64.EXE").FileVersion
9.5.0.0
Interestingly, PowerShell shows the error only in the 64-bit version, which is what I am using (Win10-64 pro, 1909 updates current)

With a Microsoft "visual studio" tool chain, you would specify something like this:

Code: Select all

[assembly: AssemblyVersion("9.50.0.0")]
For your reference, here is the MS documention on the FILEVERSION resource entry:
https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource

It says:
The version consists of two 32-bit integers, defined by four 16-bit integers
So you can - and should - use 50 as the second parameter LOWORD(dw1) for the minor version number, if you are using an old-style .rc file with a VERSIONINFO resource.

best regards,
Martin

Update - double checked with previous version:

Code: Select all

PS C:\Users\mw.XXXX> [System.Diagnostics.FileVersionInfo]::GetVersionInfo("c:\totalcmd\TOTALCMD64.EXE")

ProductVersion   FileVersion      FileName
--------------   -----------      --------
9.22a            9.22a            c:\totalcmd\TOTALCMD64.EXE


PS C:\Users\mw.XXXX> [System.Diagnostics.FileVersionInfo]::GetVersionInfo("c:\totalcmd\TOTALCMD.EXE")

ProductVersion   FileVersion      FileName
--------------   -----------      --------
9.22a            9.22a            c:\totalcmd\TOTALCMD.EXE
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *Usher »

2Dalai
There is more than one version in Version info. See report for 32-bit TC 9.22a from Resource Hacker:

Code: Select all

1 VERSIONINFO
FILEVERSION 9.2.2.1
PRODUCTVERSION 9.2.2.1
FILEOS 0x40000
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
	BLOCK "040704e4"
	{
		VALUE "CompanyName", "Ghisler Software GmbH"
		VALUE "FileDescription", "Total Commander 32 bit"
		VALUE "FileVersion", "9.22a"
		VALUE "InternalName", "TOTALCMD"
		VALUE "LegalCopyright", "Copyright \xA9 1993-2019 Christian Ghisler"
		VALUE "OriginalFilename", "totalcmd.exe"
		VALUE "ProductName", "Total Commander"
		VALUE "ProductVersion", "9.22a"
		VALUE "040904e4", "L\x16\x01CompanyName"
		VALUE "040c04e4", "L\x16\x01CompanyName"
	}
}
In the simplest words, there are binary (9.2.2.1) and text (9.22a) values there for both FileVersion and ProductVersion.
And for TC 9.50:

Code: Select all

1 VERSIONINFO
FILEVERSION 9.5.0.0
PRODUCTVERSION 9.5.0.0
FILEOS 0x40000
FILETYPE 0x1
{
BLOCK "StringFileInfo"
{
	BLOCK "040704e4"
	{
		VALUE "CompanyName", "Ghisler Software GmbH"
		VALUE "FileDescription", "Total Commander 32 bit"
		VALUE "FileVersion", "9.50"
		VALUE "InternalName", "TOTALCMD"
		VALUE "LegalCopyright", "Copyright \xA9 1993-2020 Christian Ghisler"
		VALUE "OriginalFilename", "totalcmd.exe"
		VALUE "ProductName", "Total Commander"
		VALUE "ProductVersion", "9.50"
		VALUE "040904e4", "L\x16\x01CompanyName"
		VALUE "040c04e4", "L\x16\x01CompanyName"
	}
}
So there is some mismatch with binary and text values…
Andrzej P. Wozniak
Polish subforum moderator
User avatar
Dalai
Power Member
Power Member
Posts: 9389
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *Dalai »

2Martin_W
Well, so far you didn't say that the version information of totalcmd.exe and totalcmd64.exe are different. (Another example of how important exact bug reports are.) That I can confirm, and I suggest that they're changed to match each other. But keep in mind that there are two different file version information for PE files: VS_FIXEDFILEINFO and a variable one. Both can be seen with FileInfo and PE Viewer TC Lister plugins.

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
XuaLee
Junior Member
Junior Member
Posts: 46
Joined: 2020-01-08, 20:14 UTC
Location: Vienna, Austria

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *XuaLee »

I've checked ß11 with Fileinfo v2.2.3.

File/Product version : 9.5.0.0 / 9.5.0.0 for 32bit version
File/Product version : 9.5.0.0 / 9.50.0.0 (9.50) for 64bit version

Kind regards
Windows 10 Pro 64bit 22H2 19045.4170 | Total Commander (x64) 11.03 #44961
User avatar
vdijken
Member
Member
Posts: 181
Joined: 2016-07-30, 14:07 UTC
Location: The Netherlands

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *vdijken »

I use SUMo and it reports now (22:00) that the latest beta version (12a) with version 9.5.0.0 is OK. For all the previous 9.5 Beta versions SUMo never mentioned to downgrade to version 9.22. So I don't see the problem.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: [TC 9.50 beta 12] wrong file version in EXE files

Post by *ghisler(Author) »

I'm using 9.5.0.0 for 32-bit and 9.50.0.0 for 64-bit so I can see a difference in Winqual error reports, which unfortunately don't distinguish between 32-bit and 64-bit. :(
Author of Total Commander
https://www.ghisler.com
Post Reply