foreach (System.Diagnostics.Process thisproc in System.Diagnostics.Process.GetProcesses()) { if(thisproc.ProcessName.Equals("explorer")) { thisproc.Kill(); } }