window.close();
System.Diagnostics.Process[] myProcesses;
myProcesses = System.Diagnostics.Process.GetProcessesByName("IEXPLORE");
foreach (System.Diagnostics.Process instance in myProcesses)
{
instance.CloseMainWindow();
}
instance.kill();
Process[] pros = System.Diagnostics.Process.GetProcessesByName("IEXPLORE");
foreach(Process p in pros)
{
if(p.MainWindowTitle.Equals("YourTitleSetting"))
p.Kill();
}
- //关闭所有的IE
- System.Diagnostics.Process[] myProcesses;
- myProcesses = System.Diagnostics.Process.GetProcessesByName("IEXPLORE");
- foreach (System.Diagnostics.Process instance in myProcesses)
- {
- instance.CloseMainWindow();
- }
- instance.kill();
- //关闭标题为你要求的IE
- Process[] pros = System.Diagnostics.Process.GetProcessesByName("IEXPLORE");
- foreach (Process p in pros)
- {
- if (p.MainWindowTitle.Equals("YourTitleSetting"))
- p.Kill();
- }