How can you make sure that your application verifies that the operating system meets the minimum version requirements for the application? (while installing)
I use the following code that I picked up along the way:
Public Function GetOSVersion() As String
Select Case Environment.OSVersion.Platform
Case PlatformID.Win32S
Return "Windows 3.1"
Case PlatformID.Win32Windows
Select Case Environment.OSVersion.Version.Minor
Case 0
Return "Windows 95"
Case 10
Return "Windows 98"
Case 90
Return "Windows/ME"
Case Else
Return "Unknown"
End Select
Case PlatformID.Win32NT
Select Case Environment.OSVersion.Version.Major
Case 3
Return "Windows NT 3.51"
Case 4
Return "Windows NT 4.0"
Case 5
Select Case _
Environment.OSVersion.Version.Minor
Case 0
Return "Windows 2000"
Case 1
Return "Winowes XP"
Case 2
Return "Windows 2003"
End Select
Case Else
Return "Unknown"
End Select
Case PlatformID.WinCE
Return "Windows CE"
End Select
End Function
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.