hi:

how do you incorporate a where clause and selected field clause in a wmi
query ?

this gets me caption and state fields for all services
  c = wmi.WMI()
  for service in c.Win32_Service (['Caption', 'State'])
     ...

this gets me all fields for stopped services
c = wmi.WMI()
for service in c.Win32_Service ('State == 'Stopped')
   ....

is the way to incorporate both queries into one something like this
c = wmi.WMI()
for service in c.Win32_Service (['Caption', 'State'])  WHERE ('State ==
'Stopped')

cheers
mark
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to