title: Run a batch file from Task Scheduler is not working with a java command
body: <p>Run a batch file from Task Scheduler is not working with a java command inside the .bat file. If I run the .bat file manually its working good.</p>
  
  <p>Here is the simple .bat file I'm trying to schedule</p>
  
  <pre><code>set JAVA_HOME=C:\Program Files (x86)\Java\jdk1.6.0_24;
  set CMD= "%JAVA_HOME%\bin\java" -version
  
  echo %CMD%
  %CMD%
  </code></pre>