mirror of
https://github.com/pbatard/rufus.git
synced 2025-06-04 08:29:50 -04:00
[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:
parent
80a2bce5b3
commit
fa8be68c54
2 changed files with 11 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue