title: Create a scheduled task that runs on particular user login using commandline
body: <p>I have the requirement to create a scheduled tasks that runs once when a particular user logs on. The intention is to start a task only for a particular user.</p>
  
  <p>I know that I can use the Task Scheduler to create a Task with a trigger <strong>At log on</strong> and under Settings, I specify the particular user.</p>
  
  <p>However, because I need this created during an install routine, it must be created automatically, using the command line, for example using the <em>schtasks</em> command. It is possible to create a task executed at log on using the following example:</p>
  
  <pre><code>schtasks /Create /TR executable.exe /RU user /TN name /SC ONLOGON
  </code></pre>
  
  <p>But I did not find any modifier to specify a particular user for the <strong>ONLOGON</strong> trigger.</p>
  
  <p>Resources:</p>
  
  <ul>
  <li><a href="http://technet.microsoft.com/en-us/library/bb490996.aspx" rel="nofollow">http://technet.microsoft.com/en-us/library/bb490996.aspx</a></li>
  <li><a href="http://ss64.com/nt/schtasks.html" rel="nofollow">http://ss64.com/nt/schtasks.html</a></li>
  </ul>
  
  <p>Do you know if there is any undocumented switch? Or any other commandline tool that provides the necessary features?</p>
  
  <p>Thanks.</p>