Category Archives: WMI

python and wmi

Install pywin32-214.win32-py3.1.exe and WMI-1.4.6.win32.exe import wmi # c:\Python31\python.exe d:\tmp\wmi1.py c = wmi.WMI () for s in c.Win32_Service (StartMode="Auto", State="Stopped"):   print(s.Caption) 

Posted in WMI | Leave a comment

Get CPU/Memory usage via WMI

Some tricks is required in order to use Win32_PerfFormattedData_PerfProc_Process properly, refer to Why Does My Performance Monitoring Script Keep Returning the Same Incorrect Values? VC++ is using IWbemConfigureRefresher,  IWbemRefresher and  IWbemObjectAccess as demonstrated by Accessing Performance Data in C++ Another post: … Continue reading

Posted in WMI | Leave a comment