This question already has an answer here:

My code works fine on one computer but the same code generates error code 5 (access denied) on another computer. Essentially ::OpenService() call fails because of the flag SERVICE_START because the user doesn't have privileges to start the service. I know because it does start the service if I start the app as administrator.

I want the same privileges on the 2nd computer so any user can start a service but can't figure out which settings is responsible for that. I looked into group policy >> Computer Configuration >> Windows Settings >> Security Settings >> Local Policies >> User Rights Assingment.

I don't know if I am even looking at the right place. Does anyone know?

marked as duplicate by grawity, bertieb, music2myear, Pimp Juice IT, Toto Sep 27 '18 at 8:29

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


There is no global privilege for that. Instead all services have their own individual ACLs – although you cannot see them through services.msc, only through sc sdshow/sc sdset or third-party software. (Process Hacker is one such program; it includes a graphical ACL editor in its 'Services' tab.)

  • I send sc showsd output to a text file and compared for both PCs and they are identical. The PC where it works is Windows 7, the one where it requires admin privileges, is Windows 10. Could that make any difference? – zar Sep 19 '18 at 19:27

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