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"?

link|improve this question

feedback

3 Answers

up vote 6 down vote accepted

Try deleting it's entry from regedit at:

HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Services

Make sure you reboot afterwards.

Also:

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

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

link|improve this answer
feedback

Did you do that from an elevated command prompt?

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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