因此,回到根本问题...我使用Windows Management Instrumentation(WMI)以您期望的方式生成Windows版本号。例如,它报告10.0.10586
这是一个简短的代码片段
Public Class OS
' Use Windows Management Instrumentation (WMI) to get the OS version
Public Shared Function GetOSVersion() As String
Dim answer As String = ""
' add Imports System.Management and add a resource to System.Management
Dim osClass As New ManagementClass("Win32_OperatingSystem")
For Each queryObj As ManagementObject In osClass.GetInstances()
answer = DirectCast(queryObj.GetPropertyValue("Version"), String)
Next
Return answer
End Function
End Class