I want to get OS name with edition using java or C# as mentioned in below example :

Example : Microsoft Windows 8.1 Enterprise

I have tried below :

1. In java tried `System.getProperty("os.name")`
=> It does not provide OS edition
2. One ways is to get OS name from registry
Getting "ProductName" from `\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion`
3. I also tried SYSTEMINFO command, it provides OS Name. but since it shows output different language. its not possible to check variable name from output.

But I want to find a way other than finding from registry, so that even if in future versions of OS, registry path changes, App should provide correct OS name.

Is there any other reliable way to find OS name with edition ?