Results 1 to 3 of 3

Thread: How to Use WMI Class in C#

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Posts
    3

    How to Use WMI Class in C#


  2. #2
    New Member
    Join Date
    Feb 2015
    Posts
    9

    Re: How to Use WMI Class in C#

    This link is dead. As it's the only thing on the thread, it could be removed.

  3. #3
    Member
    Join Date
    Jul 2019
    Location
    Ahmedabad
    Posts
    57

    Re: How to Use WMI Class in C#

    Please follow these steps, To How to Use WMI Class in C#.
    Step 1:Open WBEMTest as noted above.
    Step 2:Click Connect.
    Step 3:Ensure the Namespace is set to “root\cimv2” and click Connect.
    Step 4:Click Open Class.
    Step 5:Enter “Win32_OperatingSystem” and click OK.
    Info:
    The Properties (middle) list shows the information you can obtain from each instance.
    Step 6:Click Instances.
    Info:
    The list will show all instances of Win32_OperatingSystem on your system.
    Notice the list doesn’t show anything behind Win32_OperatingSystem other than the “@” sign.
    We will gather information on this default OS instance (@).
    Step 7:Click Close and Close again to get back to the main window.
    Step 8:Click Open Instance.
    Step 9:Enter “Win32_OperatingSystem=@” and click OK.
    Info:
    The Properties windows now contains information for each property in the class.
    Later we will obtain information in C# on one of these properties.
    We’ll need to note the class (Win32_OperatingSystem) and the property name we want.

    I hope this information will be useful to you.
    Thank you.
    < advertising removed by moderator >

Posting Permissions

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



Click Here to Expand Forum to Full Width