简体   繁体   中英

Reading local security policy

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.

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_RIGHTS will 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM