3

I removed MySQL but there is still a service running. I stopped the service and ran SC Delete MySQL.

This is the error that I receive:

[SC] OpenService FAILED 5: 
Access is Denied    

OS: Windows 7 Professional

I am an Administrator.

Suggestions?

2 Answers 2

3

You're most likely not running this command from an elevated command prompt. Click Start > type cmd into the search box > Right click on cmd.exe and select Run As Administrator. Try the command again.

1
  • I have the same issue. I am running with elevated priveleges as you suggest.
    – dmcgill50
    Aug 29, 2013 at 20:39
1

I had this problem, and I discovered permissions were screwed up and SYSTEM had control over it (due to an old anti-virus product protecting itself and not listening to server settings anymore). Running the elevated command prompt didn't work.

I had to run the hack were you:

  1. Take ownership of c:\windows\system32\sethc.exe and give yourself full control to it.
  2. Rename sethc.exe to sethc.exe.old
  3. copy cmd.exe, paste, and rename it sethc.exe
  4. Log off and hit SHIFT six times to get an elevated command prompt that is running as SYSTEM. Delete the service you want with this command prompt.
  5. Remember to go back and revert what you did in steps 1-3.

If you happen to be using ZenWorks in your domain, another way of doing this is using ZCM to run a script as SYSTEM for that device.

You must log in to answer this question.