ProductName in the Windows registry localized for different languages?

I am trying to detect the difference between Windows 7, Windows 8 / Windows 8.1 and Windows 10 in my C # application. I am trying to determine this using

 HKLM\Software\Microsoft\WindowsNT\CurrentVersion\ProductName

as I can check if this value reliably contains "Windows 7", "Windows 8" or "Windows 10".

My question is: is the ProductName registry value localized when Windows uses a different language pack? Will it reliably return the above values ​​in English or will it change based on the OS language?

Before I get it for not using other methods of determining the operating system that everyone likes to recommend ... using OSVersion , as it does not always return the correct values. In addition, GetVersion and GetVersionEx are also not an option, since they are not recommended after Windows 8.1, they mistakenly identify Windows 10 as Windows 8. Recommended Features Versions that are supposed to replace these methods are not available in C #. If anyone knows of another reliable way to tell the difference between these operating systems, please let me know.

+4
source share
1 answer

Windows 10 企业 版 (Enterprise) in Chinese:

HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProductName = Windows 10 Enterprise

, .

+2

Source: https://habr.com/ru/post/1599594/


All Articles