So I no that you can access the data with the ManagementClass. But can you set data? Like can you set the fan speed? If you can, how?
Printable View
So I no that you can access the data with the ManagementClass. But can you set data? Like can you set the fan speed? If you can, how?
Not that I've ever used it but the ManagementClass class has a Put method that MSDN describes as:I would assume that after setting properties of your local object you can call Put to commit the changes to the OS.Quote:
Commits the changes to the object.
Hm,
http://msdn.microsoft.com/en-us/libr...79(VS.85).aspx
How would you access the lower classes(like CIM)?
Would be nicer if .net had a Class to access WMI instead of queries. (I guess ManagementClass is that, but it still uses queries doesn't it?)
Also would you use WMI to get the network devices mac address?
You might want to look at the MgmtClassGen utility although, from memory, you still just create an instance of the generated class by passing an instance of ManagementClass that was created by executing a query. That's basically the only way to use WMI, just as SQL is really the only way to access a database. Anything else is just a layer on top of SQL, so you could create your own layer on top of WMI queries if you wanted.
O so is WMI itself a database?Quote:
Originally Posted by jmcilhinney
WMI isn't a database, it's what it reads and manipulates that is presented to you as a database.