title: Can't close certain processes with AutoHotkey
body: <p>I'm having trouble creating a small AutoHotkey script to end all vsjitdebugger.exe processes on a test server. Here's the code I have:</p>
  
  <pre><code>Process, Exist, vsjitdebugger.exe
  NewPID = %ErrorLevel%
  if NewPID = 0
  {
      MsgBox Process doesnt exist
  }
  else
  {
      MsgBox Process exists
  }
  
  
  Process, WaitClose, vsjitdebugger.exe, 5
  NewPID = %ErrorLevel%
  if NewPID = 0
  {
      MsgBox Process no longer exists
  }
  else
  {
      MsgBox Process still exists
  }
  </code></pre>
  
  <p>When run the script tells me that the (vsjitdebugger.exe) process exists, as I would expect, but when WaitClose happens it still tells me that process(es) exist, and when I look in the Task Manager the same amount of vsjitdebugger.exe processes are still running. </p>
  
  <p>I am able to end the vsjitdebugger.exe processes manually using Task Manager.</p>
  
  <p>Basically I am unable to end these processes. Could anyone help me with this? Thanks.</p>
  
  <p><strong>Update</strong>: I've also tried this simple loop too, but with no avail:</p>
  
  <pre><code>Loop, 100
  {
      Process, Close, vsjitdebugger.exe
  }
  </code></pre>
  
  <p><strong>Update 2</strong>: I tried the following code suggested below, but it just stays in the loop forever and no processes are killed:</p>
  
  <pre><code>Loop
  {
      Process, Close, vsjitdebugger.exe
      Process, wait, vsjitdebugger.exe, 0.1             
      NewPID = %ErrorLevel%
      if NewPID = 0
      {
          break
      }   
  }
  </code></pre>