Sign in with
Sign up | Sign in
Your question

Batch file using sc start service access denied

Last response: in Windows XP
December 5, 2011 12:10:09 AM

I've been able to run this batch file before but when I run this one command in a batch file I get an "Access denied" error.
First the batch file

@echo off
SC config Alerter start= auto

I can run sc config Alerter start= auto in the command prompt and it works, but it won't work in a batch file! I know I have the syntax correct. I've tried "" around the service name and the startup type, and this is verbatum from some sites I have visted.

I have XP pro and am running as administrator.

The error I receive is;
[SC] ChangeServiceConfig FAILED 5:
Access is denied.

I've searched for about 4 hours now and have not resolved this issue.
December 5, 2011 12:56:14 AM

I just ran your batch file and had success.

Right-click the batch file and click properties and the security tab.

My "group or users names" is set to "Everyone" by default with Full Control granted.

Check yours.