....the following code enumerates the running processes and its
corresponding path.
Process[] oLocalProcesses = Process.GetProcesses();
string ProcessName = string.Empty;
string ProcessPath = string.Empty;
foreach (Process oProcess in oLocalProcesses) {
ProcessName = oProcess.ProcessName;
try {
ProcessPath = oProcess.MainModule.FileName;
}
catch {
ProcessPath = "N/A";
}
Console.WriteLine("{0} {1}", ProcessName, ProcessPath);
}
Console.ReadLine();
HTH, Metallikanz!