Why does Windows 10 return the version number 6.3?

On Windows 10, the VB.NET code Environment.OS.VersionString outputs Microsoft Windows NT 6.3.9600.0. According to Microsoft documentation, Windows 10's version number is 10.0, so why does VB.NET recognise Windows 10 as Windows 8.1?

I did systeminfo | findstr /C:"OS" in Command Prompt and it returned the correct value of 10.0.10240 N/A Build 10240 under "OS Version".


Because it is picking up the fact you upgraded from Windows 8.1. The method you are using is looking at the registry. It is working as intended. There is a more appropriate function then using the environment variable to determine what operating system is being used. I can't provide code since this isn't Stackoverflow

– Ramhound Aug 26 at 1:12

That's the answer in a nutshell. During the upgrade, the registry doesn't change the build number from the old to the new one. It just sticks.