Home All Groups Group Topic Archive Search About

How to get driver version



Author
10 Aug 2005 5:16 PM
Johnny
Using the PnP driver script,
http://www.microsoft.com/technet/scriptcenter/scripts/hardware/devices/hwdevbo4.mspx
I tried to amend it so that only the network drivers shows.  How is this
done?  Where can I find information on the syntax on the for loop?  I am
thinking along the lines of "For Each objItem in colItems where
objItem.Device=NET" but this is wrong.

Author
11 Aug 2005 4:46 AM
Marty List
"Johnny" <Joh***@discussions.microsoft.com> wrote in message
news:5859F202-2584-4DC1-BF48-00DD5B9D85F9@microsoft.com...
> Using the PnP driver script,
> http://www.microsoft.com/technet/scriptcenter/scripts/hardware/devices/hwdevbo4.mspx
> I tried to amend it so that only the network drivers shows.  How is this
> done?  Where can I find information on the syntax on the for loop?  I am
> thinking along the lines of "For Each objItem in colItems where
> objItem.Device=NET" but this is wrong.


Unfortunately you can't use WHERE in the FOR EACH statement, but that would
be cool.  All of the syntax is in MSDN:
http://msdn.microsoft.com/library/en-us/script56/html/vsstmForEach.asp

Try this:

For Each objItem in colItems
    If UCase(objItem.DeviceClass) = "NET" Then
        ' Do something...
    End If
Next

AddThis Social Bookmark Button