I have a function that returns what version of windows that the application is running on:
how can I add the detection of Windows Vista to this function?
VB.NET:
Friend Function GetOSVersion() As String
Dim strVersion As String
Select Case Environment.OSVersion.Platform
Case PlatformID.Win32S
strVersion = "Windows 3.1"
Case PlatformID.Win32Windows
Select Case Environment.OSVersion.Version.Minor
Case 0
strVersion = "Windows 95"
Case 10
If Environment.OSVersion.Version.Revision.ToString() = "2222A" Then
strVersion = "Windows 98 Second Edition"
Else
strVersion = "Windows 98"
End If
Case 90
strVersion = "Windows ME"
Case Else
strVersion = "Unknown"
End Select
Case PlatformID.Win32NT
Select Case Environment.OSVersion.Version.Major
Case 3
strVersion = "Windows NT 3.51"
Case 4
strVersion = "Windows NT 4.0"
Case 5
Select Case Environment.OSVersion.Version.Minor
Case 0
strVersion = "Windows 2000"
Case 1
strVersion = "Windows XP"
Case 2
strVersion = "Windows 2003"
End Select
Case Else
strVersion = "Unknown"
End Select
Case PlatformID.WinCE
strVersion = "Windows CE"
End Select
Return strVersion
End Function
how can I add the detection of Windows Vista to this function?