ARTICLE

Get Operating System Version in VB.NET

Posted by Mahesh Chand Articles | VB.NET How do I February 28, 2010
How to get operating system version information in VB.NET.
 
Reader Level:

The following code snippet displays your Operating System version, SP, and platform details by using the OperatingSystem object and its members.

Module Module1

 

    Sub Main()

        Console.WriteLine("Operating System Detaiils")

        Dim os As OperatingSystem = Environment.OSVersion

        Console.WriteLine("OS Version: " + os.Version.ToString())

        Console.WriteLine("OS Platoform: " + os.Platform.ToString())

        Console.WriteLine("OS SP: " + os.ServicePack.ToString())

        Console.WriteLine("OS Version String: " + os.VersionString.ToString())

        Console.ReadLine()

    End Sub

 

End Module


The output will look like following:

OsImg1.jpg

share this article :
post comment
 

Hi ! Would be perfect if you could also add the following code : Dim ossverr As String =My.Computer.Info.OSFullName Console.WriteLine("OS Edition: " + ossverr) Thanks! M.Aljanin

Posted by Mohammad Aljanin Jan 21, 2011

Thanks Shadow.
We need to write these tips b/c somebody asked this question on forums ;)

Posted by Mahesh Chand Mar 03, 2010

Nice men Great Article But something more workable to form aplication!!!

Posted by shadow ghost Mar 03, 2010
Nevron Diagram
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Team Foundation Server Hosting
Become a Sponsor