Get the Operating System: Name, Platform, Version, and Service Pack using VB.NET 2008 and higher

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
 

This will return the Windows Operating System Name, Platform, and Version using the MY interface under VB 2008, Visual Basic 2010, and 2013. Then from the System.Environment class it will get the operating systems installed Service Pack, and then the entire OS info in one string value.

'This will throw 5x messageboxes with the FullName of the Installed Windows, along with
'the OS Platform, OS Version, the service pack installed, and then a message show all
'of the information about windows. that your program is running on. This works with VB 2005,
'Visual Basic.NET 2008, and Visual Basic 2010
'
MsgBox(My.Computer.Info.OSFullName)
 
MsgBox(My.Computer.Info.OSPlatform.ToString)
 
MsgBox(My.Computer.Info.OSVersion.ToString)
 
MsgBox(Environment.OSVersion.ServicePack)
 
MsgBox(Environment.OSVersion.VersionString)

Revised: 2015

Leave a Reply