4
Contributors
4
Replies
10
Views
6 Years
Discussion Span
Last Post by demafioso
1

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

Edited by Animal Mother: n/a

0

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.

Edited by demafioso: missing

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.