C#利用Process关闭所有的IE窗口

VS2005(C#)
System.Diagnostics.Process 提供对本地和远程进程的访问并使您能够启动和停止本地系统进程。

System.Diagnostics.Process[] myProcesses = System.Diagnostics.Process.GetProcesses();

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

posted @ 2007-09-24 13:44  antsoftcn  阅读(1664)  评论(0编辑  收藏  举报