Finding Full Path to Process EXE

Tim Golden mail at timgolden.me.uk
Fri Mar 28 17:53:16 EDT 2008


misceverything at gmail.com wrote:
> Hello,
> 
> I would like to write a script that would enumerate all running
> processes and return the full path to the EXE of each running
> process.  However, I can't seem to find any good info on how to do
> this..any help is greatly appreciated.  Thanks.

I have this strange feeling of deja vu. Try this:

http://timgolden.me.uk/python/wmi_cookbook.html#running_processes

(You want the .ExecutablePath or .CommandLine attributes I imagine)

TJG



More information about the Python-list mailing list