title: How to change start directory of an scheduled task with schtasks.exe in Windows programatically?
body: <p>I am trying to schedule a task with this command</p>
  
  <pre><code>SCHTASKS /Create  /TN MyTaks  /SC minute /MO 1 /TR "%cd%\myfile.exe"
  </code></pre>
  
  <p>I need Task Scheduler run my file inside current directory of <code>myfile.exe</code>.
  How this can be done considering that I tested this command also.</p>
  
  <pre><code>SCHTASKS /Create  /TN MyTaks  /SC minute /MO 1 /TR "\%cd%"%cd%\myfile.exe"
  </code></pre>