0

So here is what I am trying to do: I have set a certain group policy setting to 'Enabled' and it gets reflected in corresponding registry key Now, I go and edit in the group policy editor and set it to 'Not Defined'. The corresponding registry value gets set to '0' (the value for Disabled)

Now, how do I programatically determine, whether it is 'Not Defined' or 'Disabled'. I know about gpresult, but if there is an option via registry keys, it will be the preferred option.

2
  • Setting the group policy setting to 'Undefined' won't change registry values at all. If you want to undo a group policy change you have to change it in group policy and then set the policy to undefined. Otherwise the last group policy registry value will remain until it's changed by something else. Dec 2, 2013 at 12:33
  • Some policies write to HKLM|HKCU\Software\Policies\Microsoft rather than directly over the real key. If your setting is one of those, you would query the associated value's existence in Software\Policies. If it is there, chances are it has been set. Dec 3, 2013 at 15:44

0

You must log in to answer this question.

Browse other questions tagged .