I want to know which Windows version the PC has.. in C# Framework 3.5
I have tried using
OperatingSystem os = Environment.OSVersion;
Version ver = os.Version;
But the result is
Plataform: WIN32NT
version 6.2.9200
Version minor: 2
Version Major: 6
The problem is that I have "Windows 8 Pro"...
How can I detect it?
Thanks
You will have to match version numbers with the appropriate string value yourself.
Here is a list of the most recent Windows OS and their corresponding version number:
*For applications that have been manifested for Windows 8.1 or 10. Applications not manifested for 8.1 / 10 will return the Windows 8 OS version value (6.2).
Also, from the same source:
Identifying the current operating system is usually not the best way to determine whether a particular operating system feature is present. This is because the operating system may have had new features added in a redistributable DLL. Rather than using the Version API Helper functions to determine the operating system platform or version number, test for the presence of the feature itself.