Experts Exchange connects you with the people and services you need so you can get back to work.
string ConsoleFileName = "ConsoleApplication1";
Process ps = Process.GetProcessesByName(ConsoleFileName);
if (ps.Length > 0)
// do something else...
Open in new window
processes = new List<Process>();
using (Process process = Process.Start("SomeKindOfApp.exe"))
process.EnableRaisingEvents = true;
process.Exited += new EventHandler(process_Exited);
private void process_Exited(object sender, EventArgs e)
Process process = null;
process = sender as Process;
process = null;
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.
One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.