0

有没有办法以编程方式从 secpol.msc 编辑设置?

我正在寻找类似的东西:

        ManagementScope scope = new ManagementScope("root\\rsop\\user\\" + user.User.Value.Replace('-', '_'));
        ObjectQuery query = new ObjectQuery("Select * from RSOP_PolicySetting");
        ManagementObjectSearcher searcher = new ManagementObjectSearcher(scope, query);

root\secpol\... 是一个选项吗?

4

1 回答 1

0

我找到了解决方案。从 secedit 导出读取是完美的:https ://gist.github.com/jkingry/421802

于 2013-04-16T08:08:25.537 回答