title: Task scheduler has not enough rights when task are started automatically
body: <p>I have a problem with (possibly) the rights of the task scheduler. I have a batch(.bat) which looks like this:</p>
  <pre><code>@echo off
  E:
  cd &quot;E:\batches\Check&quot;
  copy &quot;Y:\file.txt&quot; &quot;checkFile.txt&quot;
  java -jar check_1.0.0.jar 
  del checkFile.txt
  exit
  </code></pre>
  <p>A simple batch which copies a file and starts a java-program which uses this file. When I click on the batch,</p>
  <ol>
  <li>the batch is started (in the foreground),</li>
  <li>the file is copied and</li>
  <li>the program is started.</li>
  </ol>
  <p>I have made a task in the task scheduler which starts this batch file. When I go to the task scheduler and select the task and click 'run':</p>
  <ol>
  <li>the batch is started (in the foreground),</li>
  <li>the file is copied and</li>
  <li>the program is started.</li>
  </ol>
  <p>And <strong>here</strong> comes the <strong>catch/problem</strong>. When I schedule the task to start automatically and the task is started following things happen:</p>
  <ol>
  <li>the batch is started (in the background),</li>
  <li>the file is NOT copied and</li>
  <li>the Program IS started.</li>
  </ol>
  <p>I know that the program has been started because of the exception of my program 'file does not exist'. So I assume that the automatic scheduler has not enough rights to copy the files? How can I give the right rights? Or is this an other problem I do not know about?</p>
  <p>The Task is only started if the user 'Administrator' is logged in. OS is Windows Server 2016.</p>
  <p><strong>EDIT</strong>: The security options are:
  When running the task, use the following user account:
  domain\Administrator</p>
  <p>'Run only when user is logged on' - Option is used</p>
  <p>I have also tried to run the task with System account and tried the option 'Run whether user is logged on or not'.</p>
  <p><strong>Solution</strong>:
  The solution which worked for me is:
  Options enabled:</p>
  <ul>
  <li>Run only when user is logged on (User Account: domain\Administrator)</li>
  <li>Run with highest privileges</li>
  </ul>
  <p>Can someone explain why in my case the 'highest privileges' are necessary?</p>