Task Scheduler Error 0x80070005: Access is denied.

This error is popping up when I try to schedule a Disk Cleanup in the Task Scheduler on a Sager laptop running Windows XP SP3 in a corporae environment. (Screenshot link)

Corporate IT had this to say when I asked about the issue:

The disk cleanup error is odd.  We did not build the image for those machines; they are the actual sager install, so I don’t know why you would not be to run it.

Sorry there's not more explanation to the error - I just follow these steps and it pops up when I finish setting up the scheduled task.

If anyone has troubleshooting suggestions I'll give them a shot.  I'm annoyed by not being able to automate my weekly cleanmgr and defrag (same error when I try to schedule that).

I can run Disk Cleanup as usual from the Start menu. 


"We're all in it together, kid." - Harry Tuttle, Heating Engineer
 
Question Info

Last updated May 24, 2018 Views 38,020 Applies to:
Answer

I've run into this on our network - it is a leftover effect from IT Admins who locked down the system to stop conficker.  Among other things, many windows directories (including the tasks folder) and registry entries had write privs removed for *all* users.  Try this:

1) install subinacl - http://www.microsoft.com/downloads/en/details.aspx?FamilyID=e8ba3e56-d8fe-4a91-93cf-ed6985e3927b&displaylang=en

2a) Vista -

cd /d "%programfiles%\Windows Resource Kits\Tools"
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r /setowner=administrators
subinacl /keyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f /grant=users=r /grant=everyone=r /grant=restricted=r /setowner=administrators
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /setowner=administrators
subinacl /keyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f /grant=restricted=r /grant=YOURUSERNAME=f /setowner=administrators
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators
subinacl /keyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f /grant=users=r /setowner=administrators
subinacl /subdirectories %programfiles%\ /grant=administrators=f /grant=system=f /grant=users=e
subinacl /subdirectories %windir%\ /grant=administrators=f /grant=system=f /grant=users=e

2b) Win XP -

cd /d "%ProgramFiles%\Windows Resource Kits\Tools"
subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CURRENT_USER /grant=administrators=f /grant=system=f
subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=administrators=f /grant=system=f
subinacl /subdirectories %SystemDrive% /grant=administrators=f /grant=system=f
subinacl /subdirectories %windir%\*.* /grant=administrators=f /grant=system=f
secedit /configure /cfg %windir%\repair\secsetup.inf /db secsetup.sdb /verbose

 

This should get you going.  References:

http://www.eggheadcafe.com/software/aspnet/31369811/error-80070005.aspx

http://blogs.msdn.com/b/astebner/archive/2006/09/04/739820.aspx

 

12 people were helped by this reply

·

Did this solve your problem?

Sorry this didn't help.

Great! Thanks for marking this as the answer.

How satisfied are you with this reply?

Thanks for your feedback, it helps us improve the site.

How satisfied are you with this response?

Thanks for your feedback.