Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

FYI, this question has been cross-posted from Stack Overflow.

I have a very simple program that copies files from one location to another, and I have scheduled its run everyday using the Windows scheduler.

  1. When the scheduler launches it, it fails and logs:

    System.UnauthorizedAccessException: Access to the path '' is denied.

  2. If I just launch the program by double clicking it, it fails with the same error as above.

  3. When I run the program manually with "Run as" and use the same credential that I used in the Windows scheduler it runs successfully.

The credential used in all the three cases is the one that I use to login to the system.

Can anybody please help me in understanding why this is happening?

share|improve this question
Please do not cross post between sites, this creates more noise and confusion. Thanks! – Wuffers Mar 27 '11 at 1:18
Just a random thing I found googling, can you give the permissions to the NETWORK SERVICE user instead of whatever the current user is? – CreeDorofl Mar 27 '11 at 2:55

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.