Finding Full Path to Process EXE

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • misceverything@gmail.com

    Finding Full Path to Process EXE

    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
  • Tim Golden

    #2
    Re: Finding Full Path to Process EXE

    misceverything@ 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:



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

    TJG

    Comment

    • Gabriel Genellina

      #3
      Re: Finding Full Path to Process EXE

      En Fri, 28 Mar 2008 16:40:01 -0300, <misceverything @gmail.comescri bió:
      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

      Comment

      • misceverything@gmail.com

        #4
        Re: Finding Full Path to Process EXE

        On Mar 28, 4:53 pm, Tim Golden <m...@timgolden .me.ukwrote:
        misceveryth...@ 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:
        >

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

        Comment

        • Michel Claveau - NoSpam SVP ; merci

          #5
          Re: Finding Full Path to Process EXE

          Hi!

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

          @-salutations

          Michel Claveau

          Comment

          • misceverything@gmail.com

            #6
            Re: Finding Full Path to Process EXE

            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)?

            Comment

            • Tim Golden

              #7
              Re: Finding Full Path to Process EXE

              misceverything@ gmail.com 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:



              and here:



              Alternatively, look around for the GetExtendedTcpT able 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

              Comment

              • misceverything@gmail.com

                #8
                Re: Finding Full Path to Process EXE

                On Mar 31, 2:50 am, Tim Golden <m...@timgolden .me.ukwrote:
                misceveryth...@ gmail.com 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/micro...rogrammer.wmi/...
                >
                and here:
                >

                >
                Alternatively, look around for the GetExtendedTcpT able 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.

                Comment

                Working...