if (System.Diagnostics.Process.GetProcessesByName(System.IO.Path.GetFileNameWithoutExtension(System.Reflection.Assembly.GetEntryAssembly().Location)).Count() > 1) { Console.WriteLine("App is already running on this computer. Only one instance of App can run at a time"); return; }
Process thisProcess = Process.GetCurrentProcess(); if (Process.GetProcessesByName(thisProcess.ProcessName).Count() > 1) { Console.WriteLine("Allready running"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)