Windows 2008 service creation permission

windows-server-2008windows-service

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.

Best Answer

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