Reliable way to get Windows Version from registry

前端 未结 4 1484
花落未央
花落未央 2020-12-03 15:19

I\'m checking the windows version in an installer (made with NSIS) by checking the following registry key:

HKLM \"SOFTWARE\\Microsoft\\Windows NT\\CurrentVer         


        
4条回答
  •  萌比男神i
    2020-12-03 15:36

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

提交回复
热议问题