I am trying to read a value from the Local security policies using C#. The value I am trying to read is the Debug Programs under the User Rights Assignment folder.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As far as I can tell, these settings don’t get stored in registry. You might have some success using the secedit command line tool.
cmd /c secedit /export /cfg myfile.inf /areas USER_RIGHTSwill generate the inf file which you can then parse to fish out the information you need. Not a very elegant solution, unfortunately, perhaps someone else can offer a better one.