title: Check if a process is running or not?
body: <p>I want to check if a process is running or not ?
  if the process is not running, then i execute it (in this example I took the calculator with process name = calc.exe)
  I started the batch script, but I have a syntax problem I believe !</p>
  
  <pre class="lang-none prettyprint-override"><code>@echo off
  Set MyProcess=calc.exe
  echo %MyProcess%
  pause
  for /f "tokens=1" %%i In ('tasklist /NH /FI "imagename eq %MyProcess%"') do set ff=%%i
  echo %ff%
  If /i %ff%==%MyProcess% (Echo %ff% est en cours d^'execution) Else (Start %MyProcess%)
  pause
  </code></pre>