title: BAT commands to recognize if process is running and display prompt
body: <p>I need to create a bat that recognizes if a process is running, and if the process is running I need to add a prompt asking if the user wants to end the process to continue with some other tasks. 
  I have the command to recognize if a process is running(this is the one that worked for me):</p>
  
  <pre><code>@echo off
  tasklist /nh /fi "imagename eq vmware-view.exe" | find /i "vmware-view.exe" &gt;nul &amp;&amp; (
  echo VMWare Horizon is running
  ) || (
  echo VMWare Horizon is not running
  )
  pause&gt;nul
  </code></pre>
  
  <p>and I have the command to prompt for an imput:</p>
  
  <pre><code>@echo off
  setlocal
  :PROMPT
  SET /P AREYOUSURE=Are you sure (Y/[N])?
  IF /I "%AREYOUSURE%" NEQ "Y" GOTO END
  </code></pre>
  
  <p>But I don't know how to put those 2 together to say that, if the process is running, display prompt asking user if bat can end process to continue with an update, and if not running just go on with update.</p>
  
  <p>could you please assist?
  thanks in advance</p>