Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Version info in the .EXE doesn't match what the About dialog reports

Charles Dye

Super Moderator
May
5,392
166
Staff member
Has anybody else noticed this?

Here's the current release build:


winterm1.webp


winterm2.webp



And the current Preview:

winterm3.webp


winterm4.webp



Has anyone found a reasonably elegant way to get the correct version of Windows Terminal?
 
WT version strings are a nightmare. There are several that describe the same program; they're all "correct" in some sense. I get this one from the EXE with GetFileVersionInfoW((LPCWSTR) g.szFQWTExeName, 0, dwInfoBytes, pData);

Code:
v:\> echo %_wtver
WindowsTerminal 1.22.2409.26002 (preview)

I used to dig one out of an XML file that came with WT; it was different. And if you look at the distribution file name, that's different also.

Code:
"C:\Users\vefatica\Desktop\Terminal\Microsoft.WindowsTerminalPreview_1.22.2702.0_x64.zip"
 
I think WITHIN the exe you have no chance to get the right string.

It's available in "AppxManifest.xml" * and/or "BuildInfo.xml" ** (at least in my case here) (in the dir of winterminal.exe) but thats probably not an elegant way for fileinfo ...

So for my "Microsoft.WindowsTerminal_1.21.3231.0_x64__8wekyb3d8bbwe" here, the right string is "1.21.3231.0" ...

*
Code:
<Identity Name="Microsoft.WindowsTerminal" Publisher="CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US" Version="1.21.3231.0" ProcessorArchitecture="x64" />

**
Code:
<BuildInfo BinaryVersion="1.21.2411.18001"
           SemanticVersion="1.21.241118001"
           StoreVersion="1.21.3231.0"
           BuildDefId="unknown"/>
 
It's available in "AppxManifest.xml" * and/or "BuildInfo.xml" ** (at least in my case here) (in the dir of winterminal.exe) but thats probably not an elegant way for fileinfo ...

So for my "Microsoft.WindowsTerminal_1.21.3231.0_x64__8wekyb3d8bbwe" here, the right string is "1.21.3231.0" ...

I wound up including both approaches: try parsing the XML files first, and if I don't get reasonable info out of either one, then fall back on parsing the executable's pathname.

The whole thing is so hideous Stephen King would puke, and H. P. Lovecraft would tear his own eyeballs out.
 
@Charles Dye

Ahhhhh, oooook - or not ok ;-)

Also, in my case here I use the store version (forget to mention). That's maybe another handling than the "normal" install version.

Weird thing of MS anyway with those version numbers ...
 
I think WITHIN the exe you have no chance to get the right string.

It's available in "AppxManifest.xml" * and/or "BuildInfo.xml" ** (at least in my case here) (in the dir of winterminal.exe) but thats probably not an elegant way for fileinfo ...

So for my "Microsoft.WindowsTerminal_1.21.3231.0_x64__8wekyb3d8bbwe" here, the right string is "1.21.3231.0" ...

What makes that string right?

The zip version used to come with those XLM files, it doesn't any longer. I used to dig a version string out of one of them.
 
That was just my discovery with the Store version. Thanks for info.
 
I found this.

The version resource in the PE files supports using all four version number components--each of which is 16 bits--in which we store Major, Minor, Year, Month, Day and Build Number.

The Windows Store, however, expects the fourth version component to be 0. The store will reject our updates if we use anything other than 0.

So I gather mine (WindowsTerminal 1.22.2411.18002 (preview)) is build 2 from 18 Nov 2024.

I'm trying to find out the meaning of the "3231".
 
Ha, THAT'S a good question!

Honestly I didn't check it out REALLY.

Will do it and write my "result" here ...
 
Aha! That thread did mention the day of the year. And,

Code:
WindowsTerminal 1.22.2411.18002 (preview)

v:\> echo %@doy[2024-11-18]
323

So, maybe day of year and that day's build?
 
Yes, exactly!

maj.min.EDDDB.0: maj=major; min=minor; E=number of years since maj.min was minted; DDD=3-digit day-of-year; B=deduplicating build number (portion of the version number); 0=Build (always 0 for Store version)

So the "1.21.3231.0" Store version means:

maj=1
min=21
E=number of years since maj.min was minted=N/A
DDD=3-digit day-of-year=323=November 18, 2024
B=same deduplicating build number (portion of the version number)=1st Build of the day
0=Build (always 0 for Store version)=0
 
Back
Top