Imports Microsoft.VisualBasic.Devices
Namespace ConsoleApplication2
Class Program
Private Shared Sub Main(args As String())
Dim CI As New ComputerInfo()
'get OS informations
Dim osInformation = String.Format("OS FullName: {0}, OS Platform: {1}, OS Version: {2}", CI.OSFullName, CI.OSPlatform, CI.OSVersion)
Console.WriteLine(osInformation)
Console.ReadKey()
End Sub
End Class
End Namespace
First of all, we need to add the reference to Microsoft.VisualBasic assembly.
The property OSFullName, provides the full operating system name. It returns a string containing the operating-system name.
The property OSPlatform, provides the platform identifier for the operating system of the computer. It returns a string containing the platform identifier for the operating system of the computer, chosen from the member names of the System.PlatformID enumeration.
The property OSVersion, provides the version of the computer's operating system. It returns a string containing the current version number of the operating system.