The latest release of Windows 10 (currently Insider Preview) is badged as:
Version 1511 (OS Build 10586.3)
when looking in \"Abo
FWIW, Process Monitor suggests that winver
does simply query ReleaseId
. So maybe that is indeed all there is to the "Version 1511" branding.
23:59:30,6022870 winver.exe 7004 RegQueryValue HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ReleaseID SUCCESS Type: REG_SZ, Length: 10, Data: 1511
Changing the registry value to something random is immediately reflected when launching winver
again. Removing the value makes winver
show an empty string.
So, while not nicely wrapped in an API and possibly unsupported, this seems to do the trick for now:
using (var hklmKey = Microsoft.Win32.Registry.LocalMachine)
using (var subKey = hklmKey.OpenSubKey(@"SOFTWARE\Microsoft\Windows NT\CurrentVersion"))
{
if (subKey != null)
{
string release = subKey.GetValue("ReleaseId") as string;
if (release != null)
retVal += " Version " + release;
}
}