title: Run a script on Windows startup without a user logged on
body: <p>This is a Windows 2003 (or later) machine that gets switched on every morning, but no one logs on until some hours later.</p>
  
  <p>I want to use the time in between to run a backup script c:\script\backup.cmd</p>
  
  <p>How can I start this unattended after the machine has come up?</p>
  
  <p>I tried 2 registry keys, but this resulted in the script being run after a user logs on (which is too late):</p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
  
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServices
  </code></pre>
  
  <p>In the end I used Windows TaskScheduler, who has such an option, but I was wondering if there is another possibility?</p>