Skip to Content
Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide
book

Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide

by Ed Wilson
October 2005
Beginner to intermediate
400 pages
12h 42m
English
Microsoft Press
Content preview from Microsoft® Windows® Scripting with WMI: Self-Paced Learning Guide
88 Part II: WMI Queries and Events
Set colItems = objWMIService.execquery(wmiQuery)
For Each objItem in colItems
With
objItem
Wscript.Echo .path_.relpath
WScript.Echo vbtab & .displayName & vbcrlf & vbtab & .pathName
End with
Next
role
The last way to filter out references of queries in the Where clause is to use the role keyword. The
role keyword is used to specify associations that fill a particular role.
Using the ExecQuery Method
You will use the ExecQuery method many times. Remember, methods do something, so you
can use the ExecQuery method to retrieve a collection of objects from WMI. The objects are
returned as an SWbemObjectSet collection. In this section, we examine the use of ExecQuery,
the flags used to modify it, and the sp
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Microsoft® Windows® Scripting Self-Paced Learning Guide

Microsoft® Windows® Scripting Self-Paced Learning Guide

Ed Wilson

Publisher Resources

ISBN: 0735622310Catalog PageErrata