how do i get the full path of running process in task manager.

Recommended Answers

There is a simple way to do this but there is a access security issue.
Since most of your processes run from the windows system folder the access will be denied as soon as you try to get the path, but here is the code anyways to add all the …

Jump to Post

All 4 Replies

There is a simple way to do this but there is a access security issue.
Since most of your processes run from the windows system folder the access will be denied as soon as you try to get the path, but here is the code anyways to add all the info to a listbox component, it's just not gonna do you any good.

Dim processes As System.Diagnostics.Process()
processes = System.Diagnostics.Process.GetProcesses
Dim process As System.Diagnostics.Process
For Each process In processes
    listProcess.Items.Add(process.ProcessName.ToString + " " + process.Id.ToString + " " + process.MainModule.FileName.ToString)
Next

thank u all. Both works fine...

Hi, thanks a lot but process.MainModule.FileName is not working in Windows7 32bit, its showing a "Access Denied" exception. I can guess reason but how to grand the access ? let me know it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.