dcsimg
Results 1 to 3 of 3

Thread: VMI hardware information

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2020
    Posts
    11

    VMI hardware information

    I want to use VMI to get information about the current hardware. So far I've got the following working

    Code:
            objOS = New ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem")
            For Each objMgmt In objOS.Get
                m_strOSName = objMgmt("name").ToString()
                m_strOSVersion = objMgmt("version").ToString()
                m_strComputerName = objMgmt("csname").ToString()
                m_strWindowsDir = objMgmt("windowsdirectory").ToString()
            Next
    
            objCS = New ManagementObjectSearcher("SELECT * FROM Win32_ComputerSystem")
            For Each objMgmt In objCS.Get
                m_strManufacturer = objMgmt("manufacturer").ToString()
                m_StrModel = objMgmt("model").ToString()
                m_strSystemType = objMgmt("systemtype").ToString
                m_strTPM = objMgmt("totalphysicalmemory").ToString()
                m_proccount = objMgmt("numberofprocessors")
            Next
    I want to get other information. To begin with, I'd like to get information on:
    - the capacity for any installed hard drives
    - the processors: speed, no of cores, etc.

    How do I do this?

    Is there a list of all the information that can be retrieved from VMI classes?

  2. #2
    .NUT jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    104,184

    Re: VMI hardware information

    It's WMI, not VMI. It stands for Windows Management Instrumentation. Yes there is a list of all classes available and their properties. I don't know exactly where it is but it would be easy to find using a web search, but you'd need to use the correct name in the search keywords.

  3. #3
    Member Grant Swinger's Avatar
    Join Date
    Jul 2015
    Posts
    59

    Re: VMI hardware information

    Do a search for the WMI Code Creator. It's a very handy Microsoft utility for working with WMI and it comes with the C# source code. If you're running Windows 8 or newer you'll need to add the .NET Framework 3.5 feature before using it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width