I'll just quote MSDN:
Registry.GetValue()-Method
Retrieves the value associated with the specified name, in the specified registry key. If the name is not found in the specified key, returns a default value that you provide, or a null reference (Nothing in Visual Basic) if the specified key does not exist.
This means that the value you are trying to get is not available.
Edit possible Solution:
Source: How to get the “friendly” OS Version Name?
private string GetOSName()
{
var name = (from x in new ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem").Get().OfType<ManagementObject>()
select x.GetPropertyValue("Caption")).First();
return name != null ? name.ToString() : "Unknown";
}
And to check whether OS is 32 or 64bit use following code:
private string GetOSBitness()
{
if (Environment.Is64BitOperatingSystem == true)
return " x64";
else
return " x86";
}
Above code will return (at least on my system):
Microsoft Windows 7 Professional x64