阅读本地安全策略 [英] Reading local security policy
问题描述
我正在尝试使用C#从本地安全策略中读取一个值.我要读取的值是用户权限分配"文件夹下的调试程序".
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.
推荐答案
据我所知,这些设置不会存储在注册表中.使用secedit命令行工具可能会取得一些成功. cmd /c secedit /export /cfg myfile.inf /areas USER_RIGHTS
将生成一个inf文件,您可以对其进行解析以获取所需的信息.不幸的是,这不是一个非常优雅的解决方案,也许其他人可以提供更好的解决方案.
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.
这篇关于阅读本地安全策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!