List all properties in a WMI Class

marclile

Member
Joined
Mar 11, 2003
Messages
7
Just wondering if someone knows how to list all of the properties and their values from a WMI class. I know how to get the number of properties, by doing the following:

Code:
        Dim wmi As New ManagementClass("Win32_ComputerSystem")
        wmi.Get()
        MessageBox.Show(wmi.Properties.Count.ToString)

Im just not sure how to loop through all the properties. I want to list all possible properties and their values in a ListView. Any ideas?
 
Last edited by a moderator:
Code:
Dim d As PropertyData

For Each d In wmi.Properties
etc
Next

Something like that, maybe?
 
Back
Top