解决方案 »

  1.   

    http://dev.csdn.net/article/23/23717.shtm
      

  2.   

    To lxcc(虫子|专注于抢分):
    谢谢提醒,但请看清本主题,诶,又要解释了>>>正确取得<<<系统版本的Build!
    大家可以试试用上面的方法,能否取得PWin98SE的2222实际上,俺就是因为取不到,才问的 :(
      

  3.   

    '转自 http://dev.csdn.net/article/23/23717.shtm
    Option ExplicitPrivate Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As LongPrivate Type OSVERSIONINFO
        dwOSVersionInfoSize As Long
        dwMajorVersion As Long
        dwMinorVersion As Long
        dwBuildNumber As Long
        dwPlatformId As Long
        szCSDVersion As String * 128        ' Maintenance string for PSS usage
        osName As String                    ' 我自己加的, 操作系统的名称
    End Type' 获得 Windows 操作系统的版本
    ' OSVERSIONINFO 结构中的 osName 返回操作系统的名称
    Private Function GetWindowsVersion() As OSVERSIONINFO
        Dim ver As OSVERSIONINFO
        ver.dwOSVersionInfoSize = 148
        GetVersionEx ver
        With ver
            Select Case .dwPlatformId
                Case 1
                    Select Case .dwMinorVersion
                        Case 0
                            .osName = "Windows 95"
                        Case 10
                            .osName = "Windows 98"
                        Case 90
                            .osName = "Windows Mellinnium"
                    End Select
                Case 2
                    Select Case .dwMajorVersion
                        Case 3
                            .osName = "Windows NT 3.51"
                        Case 4
                            .osName = "Windows NT 4.0"
                        Case 5
                            Select Case .dwMinorVersion
                                Case 0
                                    .osName = "Windows 2000"
                                Case 1
                                    .osName = "Windows XP"
                                Case 2
                                    .osName = "Windows Server 2003"
                            End Select
                    End Select
                 Case Else
                    .osName = "Failed"
            End Select
        End With
        GetWindowsVersion = ver
    End FunctionPrivate Sub Command1_Click()
        Dim ver As OSVERSIONINFO
        ver = GetWindowsVersion()
        With ver
            Debug.Print .osName, .dwMajorVersion, .dwMinorVersion, .dwBuildNumber, .dwPlatformId, .szCSDVersion
        End With
    End Sub
      

  4.   

    cmd
    netsh diag show os
    netsh diag show version