0

The WinBuild information can be obtained using the Powershell command "(Get-Item C:\Windows\System32\kernel32.dll).VersionInfo | format-list". This returns the following FileVersion info:

FileVersion : 10.0.17763.1697 (WinBuild.160101.0800)

I need to obtain the same FileVersion using C or C++. The GetFileVersionInfo and VerQueryValue combination only gives me 10.0.17763.1697 but I need "WinBuild.160101.0800" as well.

amah
  • 73
  • 1
  • 13
  • File version appears *twice* in the resource. Once as an easy-to-retrieve number in VS_FIXEDFILEINFO (dwFileVersionMS/LS fields) but *also* as a string that can contain arbitrary text. Without anything to look at in the question, the easy guess that you'll need the latter. – Hans Passant Jun 15 '21 at 12:59
  • I can already get the first part of FileVersion (10.0.17763.1697) from VS_FIXEDFILEINFO structure's dwFileVersionMS/LS fields but don't know how to get the second part which in my case is WinBuild.160101.0800. Where can I get 160101 and 0800 from? Or is it possible to get WinBuild.160101.0800 as a string? – amah Jun 15 '21 at 14:05

0 Answers0