title: How to end explorer.exe in Windows 8.1 (It restarts each time I do so)
body: <p>So I'm writing an app that needs to end explorer.exe before it installs. However, when using the following code Windows automatically restarts the process:</p>
  
  <pre><code>Dim proc() = System.Diagnostics.Process.GetProcessesByName("explorer.exe")
  For Each item as Process in proc()
  item.Kill()
  Next
  </code></pre>
  
  <p>Due to this problem I found a way to kill explorer.exe using taskkill here's the code and it works perfectly fine:</p>
  
  <pre><code>Dim taskkill as New ProcessStartInfo
  taskkill.FileName = "cmd.exe"
  taskkill.Arguments = "/c taskkill /F /IM explorer.exe"
  taskkill.WindowStyle = ProcessWindowStyle.Hidden
  Process.Start(taskkill)
  </code></pre>
  
  <p>But I don't want to depend on cmd.exe to do that task? Can somebody tell me how to do this using vb.net or c# code?</p>
  
  <p>Thanks.</p>