Results 1 to 4 of 4

Thread: how can I get the path of a process?

  1. #1

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Question how can I get the path of a process?

    Let's say I have a process ID and I want to get the exe path of it. Is it possible?
    Also how can I send a message to the process (like for hiding the app)

  2. #2

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    bump

  3. #3

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    I tried these two, but for every single process it just returns an empty string
    VB Code:
    1. Process.StartInfo.WorkingDirectory
    2. Process.StartInfo.FileName


    HELP PLZ!!!

  4. #4

    Thread Starter
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428
    aaaah, I'm the only one posting

    Umm I found something but this might not always work. someone plz give me some info if you can....

    In the Process.Modules array, the first item sounds like to have the path of the exe of the process

    VB Code:
    1. Process.Modules(0).FileName

    now is that always gonno be the exe of the process or am I just getting this result accidentally?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width