Skip to content

Commit

Permalink
[misc] display Windows Update Build Revision (UBR) when available
Browse files Browse the repository at this point in the history
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...
  • Loading branch information
pbatard committed Nov 14, 2019
1 parent 80a2bce commit fa8be68
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/rufus.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions src/stdfn.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

}

/*
Expand Down

0 comments on commit fa8be68

Please sign in to comment.