Service Pack 2 & WMI -
10-28-2004
, 06:55 AM
Hello,
The problem I am experiencing is a bit strange. If I attempt to query a disk
drive on a computer with SP2 it returns no results, however other queries
work fine. To explain this problem more fully I have included some example
code.
Dim scope as new ManagementScope("\\" & computer & "\root\cinv2")
Dim hdquery as New SelectQuery("Win32_DiskDrive")
Dim hdsearch as New ManagementObjectSearcher(scope,hdquery)
Dim hdinfo as ManagementObject
For each hdinfo in hdsearch.get
disksz = hdinfo("size").ToString
Next
Prior to SP2 this work, but now it returns nothing. There is no error message.
Other similiar queries for processor and memory still work.
Also if you run the query in basic vBS the query also works.
Any ideas..
Thanks
Michael |