读取和C ++程序设置组策略设置 [英] Read and set Group Policy settings from C++ program

查看:1409
本文介绍了读取和C ++程序设置组策略设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个独立的基于Windows-NT机(未连接到任何网络),我希望能读,后来通过一个C ++程序中设置的组策略设置。

I have a standalone Windows-NT based machine (not connected to any network) and I want to be able to read and later set the Group Policy settings via a C++ program.

下面是我会做手工。运行GPEDIT.MSC以管理员身份,然后说我想prevent用户访问注册表。所以在本地组策略编辑器我要到

Here's what I would do manually. Run gpedit.msc as administrator, then say I want to prevent users from accessing registry. So in the "Local Group Policy Editor" I'll go to

用户配置 - >管理模板 - >系统 - >prevent访问注册表编辑工具

User Configuration -> Administrative Templates -> System -> "Prevent access to registry editing tools"

和将其设置为已启用

有没有办法做到从C ++程序一样吗?任何code样品将大大AP preciated!

Is there any way to do the same from a C++ program? Any code samples would be greatly appreciated!

推荐答案

您可以使用的组策略API

这篇关于读取和C ++程序设置组策略设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆