kill process
im currently using this code..
using System.Diagnostics;
foreach (Process p in Process.GetProcesses())
{
if (p.ProcessName.ToLower() == "star")
if (p.ProcessName.ToLower() == "firefox")
p.Kill();
}
}
star and firefox are just examples of the .exe(s) running..
it doesn't quite work when I add another line of "if (p.ProcessName..etc)
also with the firefox line, how can I check for a specific website opened with firefox? ex.. "firefox", "www.google.com" ?
thanks ahead of time.
|