Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

What do I need to grant permission for creating a service in Windows server 2008 R2?

I have added the user to the local "Administrators" group.

This is the error message:

C:\temp>sc create test  binpath=c:\temp\test.exe
[SC] OpenSCManager FAILED 5:
Access is denied.
share|improve this question
Your command line, as entered in your question, isn't valid. There should be a space after the "=" in "binpath=". That's not your problem, though. That's probably just a transcription error. – Evan Anderson Aug 9 '10 at 13:23

I ended up temporarily disabling UAC and installing service like so:

  • Set HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA to 0 as Administrator
  • Reboot
  • Create service as non-Administrator user
  • Then set HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\System\EnableLUA back to 1 as Administrator
  • Reboot
share|improve this answer

You need to run the cmd prompt as an administrator. By default you will not have the correct rights to do this.

share|improve this answer
This can be done by right clicking the command prompt > Run as administrator – JamesK Aug 9 '10 at 13:14

Is test.exe really configured to create a service? You can't make just ANY exe be a service, the exe must be created correctly. I once tried adding notepad.exe as a service. Won't work.

share|improve this answer

I have changed the Service Permissions Right Click on Service-> Properties -> Sercurity -> Give Full control to Users.

Worked for me.

share|improve this answer

Never used sc. Have you tried installutil?

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.