|
-
Jan 20th, 2009, 10:13 PM
#1
Thread Starter
Frenzied Member
[2.0] Wmi?
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?
-
Jan 20th, 2009, 10:18 PM
#2
Re: [2.0] Wmi?
Not that I've ever used it but the ManagementClass class has a Put method that MSDN describes as:
Commits the changes to the object.
I would assume that after setting properties of your local object you can call Put to commit the changes to the OS.
-
Jan 20th, 2009, 11:55 PM
#3
Thread Starter
Frenzied Member
Re: [2.0] Wmi?
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?
-
Jan 21st, 2009, 12:17 AM
#4
Re: [2.0] Wmi?
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.
-
Jan 21st, 2009, 12:50 AM
#5
Thread Starter
Frenzied Member
Re: [2.0] Wmi?
 Originally Posted by jmcilhinney
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?
-
Jan 21st, 2009, 03:04 AM
#6
Re: [2.0] Wmi?
WMI isn't a database, it's what it reads and manipulates that is presented to you as a database.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|