开发者

How do I grant a service user sufficient rights to create registry keys in windows 7

I have an application that runs as a service, and dynamically creates and publishes windows performance (perfmon) counters.

When I run the application under my own account (as a service) which has administrative privileges, I get the following error: 714: The specified registry key is referenced by a predefined handle.

When I run the application from the command line, no error is produced.

I believe that this is a result of UAC, but I don't particularly want to disabl开发者_JS百科e UAC altogether.

Any ideas?


It is not enough just to be logged in as an administrator. The service needs to have an embedded manifest that sets the requestedExecutionLevel to requireAdministrator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜