ahmd0
ahmd0

Reputation: 17313

Read and set Group Policy settings from C++ program

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.

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

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

and set it to Enabled.

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

Upvotes: 1

Views: 5710

Answers (1)

David Heffernan
David Heffernan

Reputation: 613592

You can use the Group Policy API.

Upvotes: 3

Related Questions