Check if program is already running

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
How can I check from C# code if outlook program if the process is already
running?
if not, I run outlook with:
System.Diagnostics.Process.Start("OUTLOOK.EXE");

Thank you!
 
Hi,
How can I check from C# code if outlook program if the process is already
running?
if not, I run outlook with:
System.Diagnostics.Process.Start("OUTLOOK.EXE");

Thank you!

Well, you could try to see if the Process exists
Process[] p = Process.GetProcessesByName("Outlook");
if p > 0, Outlook is running
 
Back
Top