C#. How to programmatically grant User Log On as a Service

后端 未结 2 1370
攒了一身酷
攒了一身酷 2021-02-13 02:10

I\'ve searched through the internet, but haven\'t found any solution in c#. Does anybody know how to give user right to log on as a Service in c#?

2条回答
  •  天涯浪人
    2021-02-13 02:33

    I tried in vain to find this. The way I did it in the end was to package the NTRights executable with my application and then launch it as a separate process.

    NTRights can be found on the server 2003 resource kti and its usage is documented here: http://support.microsoft.com/kb/315276

提交回复
热议问题