Windows 2008服务创build权限

我需要授予在Windows Server 2008 R2中创build服务的权限?

我已经将用户添加到本地“pipe理员”组。

这是错误信息:

C:\temp>sc create test binpath=c:\temp\test.exe [SC] OpenSCManager FAILED 5: Access is denied. 

我结束了临时禁用UAC和安装服务,如下所示:

  • 以pipe理员身份将HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ EnableLUA设置为0
  • 重启
  • 以非pipe理员用户身份创build服务
  • 然后以pipe理员身份将HKEY_LOCAL_MACHINE \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ System \ EnableLUA重新设置为1
  • 重启

您需要以pipe理员身份运行cmd提示符。 默认情况下,你将没有正确的权利来做到这一点。

test.exe是否真的被configuration为创build一个服务? 你不能使任何exe是一个服务,exe必须正确创build。 我曾经尝试添加notepad.exe作为服务。 将无法正常工作。

我已经更改了服务权限,请右键单击服务 – >属性 – >服务 – >完全控制用户。

为我工作。

从未使用sc。 你尝试过installutil吗?