Click here to Skip to main content
15,884,986 members
Articles / Programming Languages / Visual Basic

Retrieving Information From Windows Management Instrumentation

Rate me:
Please Sign up or sign in to vote.
4.93/5 (39 votes)
15 Jul 2010CDDL15 min read 85.4K   7.4K   62  
How to use WMI to get system information and present it to the user in an easy to understand format.
'------------------------------------------------------------------------------
' <auto-generated>
'     This code was generated by a tool.
'     Runtime Version:2.0.50727.1433
'
'     Changes to this file may cause incorrect behavior and will be lost if
'     the code is regenerated.
' </auto-generated>
'------------------------------------------------------------------------------

Option Strict On
Option Explicit On

Imports System

Namespace My.Resources
    
    'This class was auto-generated by the StronglyTypedResourceBuilder
    'class via a tool like ResGen or Visual Studio.
    'To add or remove a member, edit your .ResX file then rerun ResGen
    'with the /str option, or rebuild your VS project.
    '''<summary>
    '''  A strongly-typed resource class, for looking up localized strings, etc.
    '''</summary>
    <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0"),  _
     Global.System.Diagnostics.DebuggerNonUserCodeAttribute(),  _
     Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(),  _
     Global.Microsoft.VisualBasic.HideModuleNameAttribute()>  _
    Friend Module Resources
        
        Private resourceMan As Global.System.Resources.ResourceManager
        
        Private resourceCulture As Global.System.Globalization.CultureInfo
        
        '''<summary>
        '''  Returns the cached ResourceManager instance used by this class.
        '''</summary>
        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
            Get
                If Object.ReferenceEquals(resourceMan, Nothing) Then
                    Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("SysInfo.Resources", GetType(Resources).Assembly)
                    resourceMan = temp
                End If
                Return resourceMan
            End Get
        End Property
        
        '''<summary>
        '''  Overrides the current thread's CurrentUICulture property for all
        '''  resource lookups using this strongly typed resource class.
        '''</summary>
        <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)>  _
        Friend Property Culture() As Global.System.Globalization.CultureInfo
            Get
                Return resourceCulture
            End Get
            Set
                resourceCulture = value
            End Set
        End Property
        
        Friend ReadOnly Property _107() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("_107", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property AMD_Logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("AMD_Logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property AmiBios() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("AmiBios", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property CD_Drive() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("CD_Drive", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property classic() As System.Drawing.Icon
            Get
                Dim obj As Object = ResourceManager.GetObject("classic", resourceCulture)
                Return CType(obj,System.Drawing.Icon)
            End Get
        End Property
        
        Friend ReadOnly Property computer() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("computer", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property computer_monitor() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("computer_monitor", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property cpu() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("cpu", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Devices() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Devices", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property driver() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("driver", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Folders() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Folders", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property graphics_card() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("graphics_card", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property HardDrive() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("HardDrive", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property install() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("install", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property insyde() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("insyde", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Intel_Logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Intel_Logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Memory_Modules() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Memory_Modules", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Network() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Network", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Phoenix() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Phoenix", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Processes() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Processes", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Registered_User() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Registered_User", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Services() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Services", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property USB() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("USB", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Variables() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Variables", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property win7_logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("win7_logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property windows_2000_logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("windows_2000_logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property Windows_2003_logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("Windows_2003_logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property windows_vista_logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("windows_vista_logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
        
        Friend ReadOnly Property windows_xp_logo() As System.Drawing.Bitmap
            Get
                Dim obj As Object = ResourceManager.GetObject("windows_xp_logo", resourceCulture)
                Return CType(obj,System.Drawing.Bitmap)
            End Get
        End Property
    End Module
End Namespace

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Common Development and Distribution License (CDDL)


Written By
Other
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions