aleksey.tomin
05/26/2020, 5:56 AMGetVersion
, GetSerialNumber
? I have not found these functions.Artyom Degtyarev [JB]
05/26/2020, 1:03 PMsysinfoapi.h
header including them, and then use it.russhwolf
05/26/2020, 3:27 PMGetVersion()
exists in platform.windows
. Apparently deprecated in newer Windows versions though according to https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getversionaleksey.tomin
05/27/2020, 6:10 AMsysinfoapi.def
and have found GetVersion() etcaleksey.tomin
05/27/2020, 6:36 AMval version = GetVersion().toLong()
val version0 = version.toByte()
val version1 = (version / 256).toByte()
val version2 = (version / 65536).toShort()
println("$version/${version.toString(16)} - ${version0}.${version1}.${version2}")
Result:
602931718/23f00206 - 6.2.9200
But...
C:\>cmd /c ver
Microsoft Windows [Version 10.0.18363.836]
Why 6.2 instead of 10.0?Artyom Degtyarev [JB]
05/27/2020, 9:19 AMApplications not manifested for Windows 8.1 or Windows 10 will return the Windows 8 OS version value (6.2).
aleksey.tomin
05/27/2020, 9:22 AMArtyom Degtyarev [JB]
05/27/2020, 9:49 AMIsWindows10OrGreater
?aleksey.tomin
05/27/2020, 9:59 AM