title: How can I set scheduledtask without prompting for a password
body: <p>I have an application which needs to set a scheduled tasks in Windows.
  For this I have used the ShellExecute function to call the schtasks.exe</p>
  
  <p>I have used the following code :</p>
  
  <pre><code>ShellExecute(NULL, _T("open"), _T("schtasks.exe"), _T("/create /TN SampleSchedule /TR calc.exe /SC DAILY /ST 12:15:00 /SD 09/04/2012"),_T(""),0);
  </code></pre>
  
  <p>but it has not created the scheduled task.</p>
  
  <p>But when I changed the last parameter of ShellExecute function (display command prompt) to 1</p>
  
  <pre><code>ShellExecute(NULL, _T("open"), _T("schtasks.exe"), _T("/create /TN SampleSchedule /TR calc.exe /SC DAILY /ST 12:15:00 /SD 09/04/2012"),_T(""),1);
  </code></pre>
  
  <p>a command prompt displayed and it asked for the password of the current logged in user.</p>
  
  <p>The /RU SYSTEM is working, but I would like to run as the current logged in user itself without asking for the password....</p>
  
  <p>Is it possible? If yes, what should I do for that?</p>