PC Review Forums Newsgroups Windows XP Windows XP WMI wmi issue

Reply

wmi issue

 
Thread Tools Rate Thread
Old 11-04-2007, 09:45 AM   #1
frederic.desmyter@gmail.com
Guest
 
Posts: n/a
Default wmi issue


Hello

I currently developing an vb.net windows service application that
contains a class "WMIcollector" that enables the retrieval of
win32_product, feature, elements, ... through WMI.. I got something
weird going on when retrieving Win32_SoftwareFeatureSoftwareelements.
For some reason the collection of
win32_softwarefeaturesoftwareelements causes some
annoying floppy drive access. I copied the class "WMIcollector" into
a windows form application project where the problem of the floppy
access strangely enough doesn't occure...

Its certainly not the windows service application itself that access
the drive. It just uses the WMIcollector class. When the service is
interrupted and stopped, the floppy drive is still active. So i think
its wmiprvse.exe service that uses the drive.

I already searched in newsgroups and found there was some bug in wmi
in earlier versions of
windows and wmi (windows 98 & 2000). The collection happens on a
windows xp sp2 machine and didn't find anything what may cause the
floppy drive access.

Anyone an idea what the cause may be and maybe solved it? Or has an
idea when unwanted floppy access may occure when using wmi?

thanks on advance

..net framework 1.1

Code Snippet

dim _scope as ManagementScope= New ManagementScope("root\cimv2")
Dim wmiBaseObject As ManagementBaseObject
Dim selQuery As SelectQuery
Dim searcher As ManagementObjectSearcher

Dim MyCollection As ManagementObjectCollection

Dim dr As DataRow
Dim className As String
Try

className = "Win32_SoftwareFeatureSoftwareElements"
selQuery = New SelectQuery(className)
searcher = New ManagementObjectSearcher(_scope, selQuery)

searcher.Options.ReturnImmediately = True
searcher.Options.Rewindable = False

MyCollection = searcher.Get()
.....

  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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