Return to Snippet

Revision: 32839
at October 3, 2010 03:09 by goo


Initial Code
Imports System
Imports System.Management

Namespace ConsoleApplication1
Friend Class Program
    Public Shared Sub Main()
        Dim winos As String = "Select Name from Win32_OperatingSystem"
        Dim mos As New ManagementObjectSearcher(winos)
        For Each mo As ManagementObject In mos.Get()
            Console.WriteLine("OS Name:  {0}", mo("Name"))
        Next mo
        Console.ReadLine()
    End Sub
End Class
End Namespace

Initial URL
http://www.devcurry.com/2010/10/programmatically-determine-operating.html

Initial Description

                                

Initial Title
Programmatically Determine the Operating System using .NET

Initial Tags
Net

Initial Language
VB.NET