title: kill a batch file that is stuck from another cmd box
body: <p>Hope I'm in the right place here, wasn't sure where to post and this seemed the most likely</p>
  
  <p>I use a cmd box to run a serial flasher program for repairing wifi boards, the way it works is this.
  open a command prompt and change to the working directory
  enter the command </p>
  
  <pre><code>sfh_DM36x.exe -nandflash -v -p "COM3" 
  </code></pre>
  
  <p>this starts the flashing program, however, due to the way it works, the program when finishing the first time just loops with bootme bootme, this is normal behavior.<br>
  Normally I just hit <code>CTRL+C</code> and exit the batch file.
  The same command is run again and this time the flashing process completes and you are returned to the <code>C:\</code> prompt.</p>
  
  <p>Now you have the information here is what I am trying to achieve.</p>
  
  <p>Launch a batch file that runs the runflash.bat, kill the runflash.bat and then run runflash.bat again.</p>
  
  <p>So far I have gotten as far as this (start.bat)</p>
  
  <pre><code>start c:\users\jud\desktop\runflash.bat
  timeout /t 5
  </code></pre>
  
  <p>This runs a new CMD prompt and opens the <code>runflash.bat</code></p>
  
  <p>I've then entered a timeout of 5 seconds (long enough for the first attempt to finish)</p>
  
  <p>at this point, I wanted to kill the currently open CMD prompt and then execute <code>runflash.bat</code> again.</p>
  
  <p>at this point I'm stumped, any attempt to kill the second CMD prompt just kills the original, I've looked at <code>taskkill</code> but the PID changes each time I run the script, as well as other suggestions I've come across during google searches, most just relate to killing batch files manually or killing a CMD prompt where a batch file has finished.</p>
  
  <p>Can this be done, the idea is to pass the file out to users who aren't familiar with CMD prompt workings as an all in one solution.</p>