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!
You can use the Group Policy API.