foreach (System.Diagnostics.Process myProcess in p) { if (myProcess.ProcessName.ToUpper() == "IEXPLORE") { myProcess.Kill(); } }