HighTechTalks DotNet Forums  

Service Pack 2 & WMI

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Service Pack 2 & WMI in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
MichaelCostello
 
Posts: n/a

Default 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

Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.