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.
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.