Tuesday, July 5, 2011

Python WMI Example using InstancesOf

You can download the scripting program for generating these scripts at:
http://www.planetmps.com/wmiscriptsinstancesof.html
import win32com.client
import string
locator = win32com.client.Dispatch("WbemScripting.SWbemLocator")
svc = locator.ConnectServer()
svc.Security_.AuthenticationLevel = 0
svc.Security_.ImpersonationLevel = 3
objs = svc.InstancesOf("Win32_Process")
mystr = ""
for obj in Objs:
   for prop in Objs.Properties_:
  
  
   break
  

No comments:

Post a Comment