title: Batch file not executing directly (double click)
body: <p>Just wrote a simple batch file to kill the given process.</p>
  
  <pre><code>@ECHO OFF
  set /p ProcName=Enter process name:
  taskkill /IM "%ProcName%" /t /f
  </code></pre>
  
  <p>I saved it as <code>taskkill.bat</code> . I double clicked this bat file , A command prompt window appeared and asked <code>Enter process name:</code> Whatever process name I gave every time it asked the same message and did not execute <code>taskkill</code> command at all.</p>
  
  <p>Now in a <code>cmd</code>  window I dragged the batch file and as usual it asked <code>Enter process name:</code> I gave the process name and it killed the process successfully.</p>
  
  <p>What happened first time ? And why it is executing second time ?</p>