Possible Microsoft "standard" violation in syncthing.exe

Hi,

I’ve tried to make a script which should auto-detect the Syncthing Version from the EXE file to build a package.

I haven’t got any source at hand but suspect, syncthing.exe’s resource sheet with the VersionInfo may be not conforming to Microsoft “standard”.

Try the following PowerShell command which is outlined “everywhere” on the web to get file version info.

get-childitem 'syncthing.exe' | % {$_.VersionInfo} | Select *

It will output:

FileVersionRaw     : 0.0.0.0
ProductVersionRaw  : 0.0.0.0
Comments           :
CompanyName        :
FileBuildPart      : 0
FileDescription    :
FileMajorPart      : 0
FileMinorPart      : 0
FileName           : syncthing.exe
FilePrivatePart    : 0
FileVersion        :
InternalName       :
IsDebug            : False
IsPatched          : False
IsPrivateBuild     : False
IsPreRelease       : False
IsSpecialBuild     : False
Language           : Sprachneutral
LegalCopyright     :
LegalTrademarks    :
OriginalFilename   :
PrivateBuild       :
ProductBuildPart   : 0
ProductMajorPart   : 0
ProductMinorPart   : 0
ProductName        :
ProductPrivatePart : 0
ProductVersion     :
SpecialBuild       :

I’ve analyzed the EXE file of release: https://github.com/syncthing/syncthing/releases/download/v1.4.0/syncthing-windows-amd64-v1.4.0.zip

Windows Explorer shows:

image

I suspect the wrong part is the “v” character which is redundant to the heading already containing the word “version”.

Not wanting to be picky about this, but I like to share this observation.

Kind regards

Catfriend1

We set all the individual major/minor/etc integers, so ideally the string should be just for human consumption.

1 Like

Ok, meanwhilst I’ve found a tool by Microsoft which can read the string with trailing “v” character. I’m just a little disappointed PowerShell cannot read it but no offense :-).

MS SigCheck64 from Sysinternals can do it :-)).

However it looks like there is a bug in the tagging so it doesn’t actually set those fields to something other than 0.0.0.0

1 Like
3 Likes

The PR looks good to me :-). Wew, that would help building my MSI package with less third party binary dependencies because “everyone on Windows has PowerShell”. Thank you very much.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.