title: Task running-use SYSTEM or Administrator user?
body: <p>We have an application that runs on a schedule, setup in Task Scheduler. This task is created programatically by our configuration application. </p>
  
  <p>Now, the application needs to access files in a specific directory, the default path a subdirectory in the currently logged in user's home directory. </p>
  
  <p>We have tried setting it up using the SYSTEM account but it doesn't have access to the files and the task quits as soon as it runs.</p>
  
  <p>Normally, we set it up with an administrator's password and flag to run when the user is logged in or not. However, some clients install this app on a system that doesn't require a login, means having a blank or no password. If we setup the task and manually change it to run without them logged in, it requires a password of some sort.</p>
  
  <p>How can I <strong>programatically (using C# or VB.net)</strong> create this task to run where it will not:</p>
  
  <ol>
  <li>Require an administrator or user password to run or setup</li>
  <li>Be able to access the files in "almost" any directory</li>
  <li>Be able to run whether any user is logged in or not</li>
  <li>Not require creating a new user to run this under</li>
  </ol>
  
  <p>The systems installed on range from Windows Server 2008 to Windows 10.</p>