Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to set up a scheduled task on my server 2003 box (that is sitting on the WWW) to read web logs into a database.

When I run the .cmd file that I have set up using runas, the task succeeds. However, when I try to schedule the task under the user, I get the following error:

"ImportToday.job" (ImportToday.cmd) 9/15/2010 2:37:30 PM ** ERROR **
    Unable to start task.
    The specific error is:
    0x80070005: Access is denied.
    Try using the Task page Browse button to locate the application.

Adding the account logimporter into the Administrators group lets the scheduled task succeed, but this is really not a long-term option.

I have tried adding the Log on as a service right, and the account currently has the Log on as a batch job right.

What do I need to do?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

And..... I found it.

By default, CMD.EXE requires special permissions when not logged on to a desktop session.

So, by adding Read and Read & Execute permissions for the account has fixed my problem.

That is:

cacls C:\Windows\system32\cmd.exe /e /g logimporter:r

fixed it for me.

share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.