Q:

Getting current version of Windows 10? 

I'm having a problem with installscript, and I'm trying to get the OS Version and detect if it's windows 10. 
The Key that I'm trying to get is:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\[CurrentVersion]

Using regedit, Windows 10 has the value 6.3 there.  The same has Windows 8.1 and Windows 2012. 
But, if I use WINVER on commandline, I get 10.0.  How can this be? 

A:

Instead of reading the value CurrentVersion, read the new values CurrentMajorVersionNumber (which is 10) and CurrentMinorVersionNumber (which is currently 0) under Windows 10.  Those 2 keys are new in Windows 10 to detect Windows Version from Registry.