"Access is denied" when trying to run new Scheduled Task 0x80070005

6,040

So it turns out that the command line parameters / options are very important to have formatted properly with the quotes in the right places. We thought we had tried every option here, but apparently we did not try the right option until just now. This post has the money text:

Important: The command line options must be placed OUTSIDE of the "" that surround the path. "" are needed because otherwise path names with spaces (like in c:\program files) can not be interpreted correctly by the task scheduler.

The correct entries in "Run:" are:

"C:\Program Files\NTBackupScript\ntbackupscript.cmd" checktape
"C:\Program Files\NTBackupScript\ntbackupscript.cmd" BackupJobFull normal
"C:\Program Files\NTBackupScript\ntbackupscript.cmd" BackupJobFull differential
Share:
6,040

Related videos on Youtube

Mark A
Author by

Mark A

Updated on September 18, 2022

Comments

  • Mark A
    Mark A almost 2 years

    We are using the wonderful NTBackupScript on a Windows 2003 server to automate our backups with the built-in NTBackup. I've used this successfully in the past to run totally automated and bombproof backups, but we're rebuilding our backup server and have run into some snags when trying to create and run the scheduled tasks.

    At this point we believe it's a permissions issue that is preventing the scheduled tasks from running. However, we think we've looked into all permissions and security-related issues and can't figure out why it's still not running.

    We have already:

    1. UNBLOCK'ed all files from the .zip file.
    2. Tried every iteration of " and ' with the parameters (e.g. checktape, differential, FullBackup.bks, etc.) <-- Apparently we did not try every iteration. See answer, below.
    3. Password is correct.
    4. Running all of this as Administrator.
    5. Added "Batch" permissions to cmd.exe per one of the MS Technet recommendations.
    6. Ensured that Administrator has the right permissions to cmd.exe per Technet.
    7. Checked that Administrative Tools/Services/Task Scheduler uses "Local System" as its Log On As account.
    8. It doesn't make sense to create a special user/group for this as outlined here.
    9. Used Process Monitor to look for potential issues but nothing jumped out at us (and we are Process Monitor noobs).

    We still get the error 0x80070005 in the log. Why?

    The schedule tasks in the list

    Scheduled Task log w/ error message

    Parameter options - we've tried with and without single and double quotes

    Process Monitor output includes the following. NAME NOT FOUND and BUFFER OVERFLOW are suspicious but I haven't figured out what to do differently based upon them.

    Detailed output from Process Monitor

    • fencepost
      fencepost over 12 years
      If you're comfortable doing all that you'll probably be comfortable digging through the masses of output that you'll get from the SysInternals Process Monitor, so that's going to be my suggestion. Available from technet.microsoft.com/en-us/sysinternals/bb896645 or just find it on the sysinternals site.
    • Admin
      Admin over 12 years
      My guess (educated, but a guess all the same) is a temporary path where the zips are created, does not have either sufficient space, or correct permissions. Process Monitor will help you locate that path.
  • Mark A
    Mark A over 12 years
    Surprisingly, there was nothing in Event Viewer at all.