title: How force close all IE processes - with alert() on form_unload
body: <p>I wrote the codes below to close all IE (Internet Explorer) Processes.   </p>
  
  <pre><code>private void Kill_IE()
  {
      Process[] ps = Process.GetProcessesByName("IEXPLORE");
  
      foreach (Process p in ps)
      {
          p.Kill();
      }
  }
  </code></pre>
  
  <p>The problem is some opened IE windows show an alert :  </p>
  
  <pre><code>alert("do not close my web site"); //in JavaScript
  </code></pre>
  
  <p>or a </p>
  
  <pre><code>confirm_box("do you really want to exit?" , "YES|NO"); //in JavaScript
  </code></pre>
  
  <p>before exit(<strong>Unload_Form</strong>) and my program can't close those windows.<br>
  How can i ignore those alerts and force close those windows?</p>
  
  <p><hr>
  <strong>Edit :</strong><br>
  The ways below can't close that browser with that annoying alert...   </p>
  
  <p>Show the black console :</p>
  
  <pre><code>Process.Start("taskkill", "/im iexplore.exe /f /t");
  </code></pre>
  
  <p>Hide the black Console :</p>
  
  <pre><code>ProcessStartInfo startInfo = new ProcessStartInfo();
  startInfo.FileName = "taskkill.exe";
  startInfo.WindowStyle = ProcessWindowStyle.Hidden;
  startInfo.Arguments = "/f /t /im iexplore.exe";
  Process.Start(startInfo);
  </code></pre>
  
  <p>Any Idea?   </p>