Re: Finding Full Path to Process EXE

2008-03-31 Thread misceverything
On Mar 31, 2:50 am, Tim Golden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > 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/...
>
> 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.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-31 Thread Tim Golden
[EMAIL PROTECTED] wrote:
> 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
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-30 Thread 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)?
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-29 Thread Michel Claveau - NoSpam SVP ; merci
Hi!

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

@-salutations

Michel Claveau

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-29 Thread misceverything
On Mar 28, 4:53 pm, Tim Golden <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] 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

Thanks, Tim!  I was able to find plenty out there about enumerating
processes, but the .ExecutablePath was exactly what I needed.
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-28 Thread Gabriel Genellina
En Fri, 28 Mar 2008 16:40:01 -0300, <[EMAIL PROTECTED]> escribió:

> 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.

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Finding Full Path to Process EXE

2008-03-28 Thread Tim Golden
[EMAIL PROTECTED] 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
-- 
http://mail.python.org/mailman/listinfo/python-list


Finding Full Path to Process EXE

2008-03-28 Thread 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
-- 
http://mail.python.org/mailman/listinfo/python-list