I created a Group Policy extension that implements ProcessGroupPolicyEx. I sucesfully am notified when I receive a group policy.
I am however at a loss to how to read the policy from inside the GPO. The example stops at looping through GPOs:
for( pCurGPO = pChangedGPOList; pCurGPO; pCurGPO = pCurGPO->pNext )
{
if( *pbAbort )
{
// Abort.
break;
}
// ...
}
That is fine, but how do I get the policy (the actual settings) inside the pCurGPO? I need to get either the settings that this GPO contains, or the registry key where it stores them. This is because I created multiple ADMX templates that target my extension, so I need to tell them apart.
So far, I've found some samples, but they assume that the extension knows what registries will be changed, in advance. However, in my case, I do not want the extension to make this assumption, I want it to check the updated GPO and determine exactly what is being changed.
Any pointers would be greatly appreciated.
So after squirreling through the Chromium code (per amritanshu comment), I found one way which seems to work, however I am not yet understanding what exceptions there may be (if any):
The PReg file is documented here: https://msdn.microsoft.com/en-us/library/aa374407(v=vs.85).aspx
If anyone sees anything wrong with this approach, or knows of any exceptions for this algorithm, please let me know.
EDIT: Also found this blog with a better written, though similar explanation: https://redsigil.weebly.com/home/group-policy-callbacks-the-missing-documentation
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With