• Earn real money by being active: Hello Guest, earn real money by simply being active on the forum — post quality content, get reactions, and help the community. Once you reach the minimum credit amount, you’ll be able to withdraw your balance directly. Learn how it works.

.NET Detected version of Windows

Status
Not open for further replies.

Nax

Leech
User
Joined
Oct 18, 2011
Messages
275
Reputation
0
Reaction score
115
Points
43
Credits
0
‎13 Years of Service‎
92%
Code:
>'Author: [i]Pro
'Home: i-Pro.name
'Date: 25.10.11
Public Function GetVersion()
   Dim os As System.OperatingSystem = System.Environment.OSVersion
   Dim osName As String = "Unknown"
   Select Case os.Platform
       Case System.PlatformID.Win32Windows
           Select Case os.Version.Minor
               Case 0
                   osName = "Windows 95"
               Case 10
                   osName = "Windows 98"
               Case 90
                   osName = "Windows ME"
           End Select
       Case System.PlatformID.Win32NT
           Select Case os.Version.Major
               Case 3
                   osName = "Windws NT 3.51"
               Case 4
                   osName = "Windows NT 4"
               Case 5
                   If os.Version.Minor = 0 Then
                       osName = "Windows 2000"
                   ElseIf os.Version.Minor = 1 Then
                       osName = "Windows XP"
                   ElseIf os.Version.Minor = 2 Then
                       osName = "Windows Server 2003"
                   End If
               Case 6
                   osName = "Windows Vista"
                   If os.Version.Minor = 0 Then
                       osName = "Windows Vista"
                   ElseIf os.Version.Minor = 1 Then
                       osName = "Windows 7"
                   End If
           End Select
   End Select
   Return osName & ", " & os.Version.ToString()
End Function
 
Status
Not open for further replies.
Back
Top