hi:<br><br>how do you incorporate a where clause and selected field clause in a wmi query ? <br><br>this gets me caption and state fields for all services<br>&nbsp; c = wmi.WMI()<br>&nbsp; for service in c.Win32_Service ([&#39;Caption&#39;, &#39;State&#39;])<br>
&nbsp;&nbsp;&nbsp;&nbsp; ...<br><br>this gets me all fields for stopped services <br>c = wmi.WMI()<br>
for service in c.Win32_Service (&#39;State == &#39;Stopped&#39;)<br>&nbsp;&nbsp;
....<br><br>is the way to incorporate both queries into one something like this<br>c = wmi.WMI()<br>
for service in c.Win32_Service ([&#39;Caption&#39;, &#39;State&#39;])&nbsp; WHERE (&#39;State == &#39;Stopped&#39;)<br><br>cheers<br>mark<br><br>