Skip to content

VERSIONINFO resource is non-compliant #19106

@alabuzhev

Description

@alabuzhev

Windows Terminal version

1.24.2507.04001

Windows build number

Irrelevant

Other Software

No response

Steps to reproduce

  1. Get the latest terminal nightly.
  2. Pick any PE binary from the distribution, e.g. OpenConsole.exe.
  3. Extract its VERSIONINFO resource using third party tools.
  4. Do the same for any other typical Windows binary, e.g. conhost.exe.
  5. Compare both.

Expected Behavior

The basic structure should be consistent (see below).

Actual Behavior

There are quite a few differences:

Image

The most problematic one is that VarFileInfo.Translation is inconsistent with StringFileInfo header:

  • VarFileInfo.Translation is [0, 1200] => [language neutral, Unicode]
  • StringFileInfo header is "040904b0" => [U.S. English, Unicode]

This ultimately means that third-party apps cannot query version information of these binaries using VerQueryValue API, because they are supposed to obtain the language-codepage pair from VarFileInfo.Translation first, serialise it as %04x%04x and use that as a key to request data from a corresponding block in StringFileInfo, but serialising [0, 1200] obviously yields "000004b0", which is not there.

Image

Notice that the StringFileInfo block is missing. The tool has failed to find it in OpenConsole.

Minor issues:

  • All the Windows binaries and probably most of binaries in the wild these days set FILEOS to VOS_NT_WINDOWS32 (0x40004), i.e. "Win32 subsystem running on NT", which is probably the only reasonable combination anyway. In WT binaries it is for some reason set to just 0x4, i.e. VOS__WINDOWS32. The high word is 0, implying that the base OS is VOS_UNKNOWN. Not a big deal, but can be confusing.
  • Spaces in LegalCopyright seems to be off.
  • FileDescription could be better :)

Very minor issues:

  • When I build locally, binaries don't include version info, is it by design?

Metadata

Metadata

Assignees

Labels

Area-BuildIssues pertaining to the build system, CI, infrastructure, metaIssue-BugIt either shouldn't be doing this or needs an investigation.Needs-Tag-FixDoesn't match tag requirementsPriority-3A description (P3)Product-MetaThe product is the management of the products.

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions