private void closeie() { System.Diagnostics.Process[] myProcesses; myProcesses = System.Diagnostics.Process.GetProcessesByName("IEXPLORE"); foreach (System.Diagnostics.Process instance in myProcesses) { instance.CloseMainWindow(); } //instance.kill();
} private void closechrome() { System.Diagnostics.Process[] myProcesses; myProcesses = System.Diagnostics.Process.GetProcessesByName("chrome"); foreach (System.Diagnostics.Process instance in myProcesses) { instance.CloseMainWindow(); } } private void closeMaxthon() { System.Diagnostics.Process[] myProcesses; myProcesses = System.Diagnostics.Process.GetProcessesByName("Maxthon"); foreach (System.Diagnostics.Process instance in myProcesses) { instance.Close (); // instance.Kill(); } } private void closefirefox() { System.Diagnostics.Process[] myProcesses; myProcesses = System.Diagnostics.Process.GetProcessesByName("firefox"); foreach (System.Diagnostics.Process instance in myProcesses) { instance.CloseMainWindow(); } } private void close360se() { System.Diagnostics.Process[] myProcesses; myProcesses = System.Diagnostics.Process.GetProcessesByName("360se"); foreach (System.Diagnostics.Process instance in myProcesses) { instance.CloseMainWindow(); } }
|
请发表评论