Server Fault is a question and answer site for system and network administrators. 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

I am getting the following message while trying to remove a windows service with SC command?

C:\Users\chacha>sc delete service_name
[SC] OpenService FAILED 5:

Access is denied.

I tried to change the properties of Service and retried to remove them but failed. Even I disabled the service and restarted the machine :(

Any idea on forcefully removing a service? What is the reason for this "Locking"?

share|improve this question
up vote 9 down vote accepted

Try deleting it's entry from regedit at:


Make sure you reboot afterwards.


  • Try removing the service while in safe mode.
share|improve this answer

You could try using Sysinternals Autoruns program to disable or delete the service.

share|improve this answer

Did you do that from an elevated command prompt?

share|improve this answer

That's because you need admin rights.

Before opening cmd.exe right click it and select "Run as administrator". Also you can hold CONTROL+SHIFT and press ENTER to open it with admin rights.

share|improve this answer

Your Answer


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.