How to get the path of running processes

Hi,

I am trying to get the path and filename of the processes running in task manager. I am able to get a list of the processes, by using the Process class, obtaining an array with Process.GetProcesses and then doing a for each through the collection.

What I can't do is see any information about the process by using StartInfo.FileName and StartInfor.WorkingDirectory, which are empty.

I know that you usually put data into those properties when you create your own Process object and want to start a specific process, but I was wondering if it can be done the other way also: getting access to a process object and then reading all the available information about it, like file name and working directory.

Thank you.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories