Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Windows OS Version

Posted on December 14, 2013October 26, 2015 By David Kittell
 Public Function GetOSVersion() As String
        Dim sOSType As String = ""
        Select Case Environment.OSVersion.Platform
            Case PlatformID.Win32S
                sOSType = "Win 3.1"
            Case PlatformID.Win32Windows
                Select Case Environment.OSVersion.Version.Minor
                    Case 0
                        sOSType = "Win95"
                    Case 10
                        sOSType = "Win98"
                    Case 90
                        sOSType = "WinME"
                    Case Else
                        sOSType = "Unknown"
                End Select
            Case PlatformID.Win32NT
                Select Case Environment.OSVersion.Version.Major
                    Case 3
                        sOSType = "NT 3.51"
                    Case 4
                        sOSType = "NT 4.0"
                    Case 5
                        Select Case _
                            Environment.OSVersion.Version.Minor
                            Case 0
                                sOSType = "Win2000"
                            Case 1
                                sOSType = "WinXP"
                            Case 2
                                sOSType = "Win2003"
                        End Select
                    Case 6
                        sOSType = "Vista"
                    Case Else
                        sOSType = "Unknown"
                End Select
            Case PlatformID.WinCE
                sOSType = "Win CE"
        End Select
        Return sOSType
    End Function
If GetOSVersion() = "WinXP" Then
  'Computer is Windows XP
End If
Originally Posted on December 14, 2013
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code VB.NET

Post navigation

Previous post
Next post

Related Posts

Update Table With Inner Join

Posted on September 18, 2013October 26, 2015

UPDATE table1 SET table1.column1 = table2.column1 ,table1.last_name = table2.last_name ,table1.first_name = table2.first_name ,table1.gender = table2.gender FROM table1 INNER JOIN table2 ON table1.child_column2 = table2.column2 WHERE table1.child_column2 IS NOT NULL; Originally Posted on September 18, 2013Last Updated on October 26, 2015 All information on this site is shared with the intention…

Read More

Search All Tables Function

Posted on February 25, 2013October 26, 2015

If you have access to create functions/procedures use this script. CREATE PROC SearchAllTables (@SearchStr NVARCHAR(100)) AS BEGIN — Copyright © 2002 Narayana Vyas Kondreddi. All rights reserved. — Purpose: To search all columns of all tables for a given search string — Written by: Narayana Vyas Kondreddi — Site: http://vyaskn.tripod.com…

Read More

Create Shortcut (VB, VB.Net, PowerShell)

Posted on December 14, 2013December 10, 2019

Sub Create_ShortCut(ByVal TargetPath As String, ByVal ShortCutPath As String, ByVal ShortCutname As String, Optional ByVal WorkPath As String = "", Optional ByVal Window_Style As Short = 0, Optional ByVal IconNum As Short = 0) Dim VbsObj As Object VbsObj = CreateObject("WScript.Shell") Dim MyShortcut As Object ShortCutPath = ShortCutPath MyShortcut =…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes