[misc] display Windows Update Build Revision (UBR) when available

Yet another link in the long chain of Microsoft making it UNFATHOMABLY DIFFICULT
to figure out what version of Windows an application is actually running on...
This commit is contained in:
Pete Batard 2019-11-14 22:43:24 +00:00
parent 80a2bce5b3
commit fa8be68c54
No known key found for this signature in database
GPG Key ID: 38E0CF5E69EDD671
2 changed files with 11 additions and 8 deletions

View File

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.9.1586"
CAPTION "Rufus 3.9.1587"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -394,8 +394,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,9,1586,0
PRODUCTVERSION 3,9,1586,0
FILEVERSION 3,9,1587,0
PRODUCTVERSION 3,9,1587,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -413,13 +413,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.9.1586"
VALUE "FileVersion", "3.9.1587"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2019 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.9.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.9.1586"
VALUE "ProductVersion", "3.9.1587"
END
END
BLOCK "VarFileInfo"

View File

@ -351,14 +351,17 @@ void GetWindowsVersion(void)
else
safe_sprintf(vptr, vlen, "%s %s", w, w64);
// Add the build number for Windows 8.0 and later
// Add the build number (including UBR if available) for Windows 8.0 and later
nWindowsBuildNumber = vi.dwBuildNumber;
if (nWindowsVersion >= 0x62) {
int nUbr = ReadRegistryKey32(REGKEY_HKLM, "Software\\Microsoft\\Windows NT\\CurrentVersion\\UBR");
vptr = &WindowsVersionStr[safe_strlen(WindowsVersionStr)];
vlen = sizeof(WindowsVersionStr) - safe_strlen(WindowsVersionStr) - 1;
safe_sprintf(vptr, vlen, " (Build %d)", nWindowsBuildNumber);
if (nUbr > 0)
safe_sprintf(vptr, vlen, " (Build %d.%d)", nWindowsBuildNumber, nUbr);
else
safe_sprintf(vptr, vlen, " (Build %d)", nWindowsBuildNumber);
}
}
/*