Finding Full Path to Process EXE

M

misceverything

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.

T
 
G

Gabriel Genellina

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.

Use Tim Golden's WMI wrapper.
Searching for "python enumerate running processes" with Google returns a
reference to his module on the *first* hit. Searching in this newsgroup
only, returns tons of references.
 
G

Guest

Hi!

Warning : WMI give the "command-line" of a process only for windows >
2000

@-salutations

Michel Claveau
 
M

misceverything

That's not a problem - I'm only interested in Win2k+. Thanks for the
caveat.

On a similar note, is there a way (preferably using WMI) to get the
full path to the executable that has a port open (the same thing that
fport does, just implemented in Python)?
 
T

Tim Golden

That's not a problem - I'm only interested in Win2k+. Thanks for the
caveat.

On a similar note, is there a way (preferably using WMI) to get the
full path to the executable that has a port open (the same thing that
fport does, just implemented in Python)?

It looks as though it might be possible with the (not
installed by default) SNMP WMI provider. Haven't tried
it myself, but there's some info here:

http://groups.google.com/group/microsoft.public.win32.programmer.wmi/msg/761b8497826e4aea

and here:

http://msdn2.microsoft.com/en-us/library/aa393621(VS.85).aspx

Alternatively, look around for the GetExtendedTcpTable functionality
and so on.

Sorry, this isn't really my area -- all I've done here is to let
my fingers do the walking.

TJG
 
M

misceverything

It looks as though it might be possible with the (not
installed by default) SNMP WMI provider. Haven't tried
it myself, but there's some info here:

http://groups.google.com/group/microsoft.public.win32.programmer.wmi/...

and here:

http://msdn2.microsoft.com/en-us/library/aa393621(VS.85).aspx

Alternatively, look around for the GetExtendedTcpTable functionality
and so on.

Sorry, this isn't really my area -- all I've done here is to let
my fingers do the walking.

TJG

Sounds good - I'm going to check those links out now. Thanks again
for all your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top