J
Jesse
Anyone with experience getting disk data from WMI, I sure could use some
advice!
I'm trying to figure out how to access MSStorageDriver_FailurePredictData
correctly, but I'm kind of stumped.
"select * from MSStorageDriver_FailurePredictData" gives me data for my
internal drive, but not my external USB drive
So I tested to see if I could filter by InstanceName:
"select * from MSStorageDriver_FailurePredictData where InstanceName =
'findNothing'" successfully returns no records
Next, I queried Win32_DiskDrive to get the instance names of my two drives:
deviceID = myManagementObject.Properties("PNPDeviceId").Value
....and after verifying that they looked correct (one of them matched the
InstanceName returned by MSStorageDriver), I tried to force MSStorageDriver
to find the other drive:
"select * from MSStorageDriver_FailurePredictData where InstanceName = '" &
deviceId & "'"
....but this crashes when I try to ennumerate the ManagementObjectCollection
returned by ManagementObjectSearcher. Since it's crashing, I know it's
returning *something* -- it worked fine when I filtered on "findNothing" --
but what?
Thanks for the help,
Jesse
--
advice!
I'm trying to figure out how to access MSStorageDriver_FailurePredictData
correctly, but I'm kind of stumped.
"select * from MSStorageDriver_FailurePredictData" gives me data for my
internal drive, but not my external USB drive
So I tested to see if I could filter by InstanceName:
"select * from MSStorageDriver_FailurePredictData where InstanceName =
'findNothing'" successfully returns no records
Next, I queried Win32_DiskDrive to get the instance names of my two drives:
deviceID = myManagementObject.Properties("PNPDeviceId").Value
....and after verifying that they looked correct (one of them matched the
InstanceName returned by MSStorageDriver), I tried to force MSStorageDriver
to find the other drive:
"select * from MSStorageDriver_FailurePredictData where InstanceName = '" &
deviceId & "'"
....but this crashes when I try to ennumerate the ManagementObjectCollection
returned by ManagementObjectSearcher. Since it's crashing, I know it's
returning *something* -- it worked fine when I filtered on "findNothing" --
but what?
Thanks for the help,
Jesse
--