I can't get my program to recognise Windows 8.1.
I am using this code snippet from one of the posts on this forum but it recognizes for all OS except windows 8.1 which reportedly seems to show as Windows 10 for my customers.
Unfortunately I don't have 8.1 installed anywhere to test. My experience with all things Windows 8 was unregrettably short :)
#elseif TargetWin32 dim OS_CODE as Integer os = "Windows" //try to be more specific of windows version Soft Declare Sub GetVersionExA Lib "Kernel32" ( info As Ptr ) Soft Declare Sub GetVersionExW Lib "Kernel32" ( info As Ptr ) Dim info As MemoryBlock If System.IsFunctionAvailable( "GetVersionExW", "Kernel32" ) Then info = New MemoryBlock( 20 + (2 * 128) ) info.Long( 0 ) = info.Size GetVersionExW( info ) Else info = New MemoryBlock( 148 ) info.Long( 0 ) = info.Size GetVersionExA( info ) End If Dim Str As String OS_CODE=info.Long(4)*100+info.long(8) Select Case OS_CODE Case 400 os = "Windows 95/NT 4.0" Case 410 os = "Windows 98" Case 490 os = "Windows Me" Case 300 To 399 os = "Windows NT 3.51" OS_CODE=30 Case 500 os = "Windows 2000" Case 501 os = "Windows XP" Case 502 os = "Windows Server 2003" Case 600 os = "Windows Vista" Case 601 os = "Windows 7" Case 602 dim s as new shell s.execute("ver") dim res as string = s.Result if val(mid(res,30,2)) = 10 then os = "Windows 10" else os = "Windows 8/8.1" end if End Select Return os