Process Already Running
Posted by Ron Rechtman
Wednesday, March 24, 2010 11:45:38 PM
So you want to know if a process is running...
using System.Diagnostics;
public static bool IsProcessAlreadyRunning()
{
Process currentProcess = Process.GetCurrentProcess();
List<Process> processes = Process.GetProcesses().Where(x=>x.ProcessName == currentProcess.ProcessName).ToList<Process>();
return (processes.Count > 1);
}
Enjoy!