I try to get the SMART data from my HDD using WMI (this is the only way I found). Using the namespace root\WMI with class MSStorageDriver_ATAPISmartData I can get the VendorSpecific. I just wonder how can I choose for which HDD I want to check SMART. This give me only one the system drive what about other ones also installed in my computer?
Asked
Active
Viewed 1,880 times
1 Answers
0
You can filter on the other properties of the returned object.
Eg. MSStorageDriver_ATAPISmartData.InstanceName
will match Win32_DiskDrive.PNPDeviceID
and thus allowing access to more details about the drive and associations through the WMI object graph.

Richard
- 106,783
- 21
- 203
- 265
-
Thank you I have to overlook this property. Following this solution I have met other problem because using query : ("root\\WMI", "SELECT SelfTestStatus FROM MSStorageDriver_ATAPISmartData WHERE InstanceName = \"IDE\\DiskWDC_WD5000AAKS-22V1A0___________________05.01D05\\5&1b7131ce&0&4.0.0_0\""); catch an exception. If I only change the PNPDeviceID to eg. "DiskWDC_WD5000AAKS-22V1A0___________________05.01D05" everything is fine. As I see this is related with backslash '\'. I also try to put there string variable and still the same. Do you have any idea why it works like this? – spychu May 18 '11 at 09:36
-
@spychu: "Do you have any idea why it works like this?" There are some things that are strange, many of them are in WMI. Choices of property names and types, choices about ids are generally inconsistent. – Richard May 18 '11 at 09:42