Show all processes with IDs

This script shows all running processes with their process IDs. It uses the wmi-class from Tim Golden. Please put it into the directory where you run this script from.

import wmi 
c = wmi.WMI () 
for process in c.Win32_Process ():
    print process.ProcessId, process.Name 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.