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.
相关问题
- Sorting 3 numbers without branching [closed]
- Graphics.DrawImage() - Throws out of memory except
- Why am I getting UnauthorizedAccessException on th
- 求获取指定qq 资料的方法
- How to know full paths to DLL's from .csproj f
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.