WMI (Windows Managment Instrument)

WMI (Windows Managment Instrument)
This is how Windows and Win32Api application works.
All are based on the WMI.
The WMI return ALL Computer, devices and Windows Information. Most of you (I think know how to use it)
But the problem still of how to know it's classes
I'll give you the code of how to use it :
First of all add the System.Managment Reference and Imports it "Imports System.Management"
Dim info As Management.ManagementObject
Dim search1 As New Management.ManagementObjectSearcher("SELECT * FROM Win32_OperatingSystem")
For Each info In search1.Get()
MsgBox info("Name").ToString()
Next
The following function will return the Operating System Name stored in the Managment Instrument of Windows.
Now the problem that most of developers face, is how to find the classes.
I found here a solution given by Roman, Anima Online Hardware Monitor.
It's let's you find all of them and even do query, this will fast you work !
Find it @ : http://animaonline.blogspot.com/2007/03/animaonline-hardware-monitor-10.html

0 comments:

Post a Comment