Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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#?

like image 653
MaksymD Avatar asked Aug 17 '09 08:08

MaksymD


1 Answers

EDIT: I found an article on CodeProject with sample code that shows exactly how to do this!

I assume you've already found this KB that shows how to do it with native code. I'm looking for a C# way as well.

like image 55
GuyBehindtheGuy Avatar answered Nov 15 '22 13:11

GuyBehindtheGuy