Sunday, September 4, 2016

Policy Plus - Element inspection

Today I added a pretty neat dialog to Policy Plus. It lets you dig into a policy's definition, examining the Registry settings it affects, its presentation elements, and its policy elements. The dialog is called Element Inspector and is accessible through the context menu entry of the same name.


Along the way, I noticed a couple mistakes I had made earlier. String values (from Registry entry lists) were never loaded. I had also neglected to look for a clientExtension attribute on policies in addition to elements.

It turns out that Windows 10 introduced a new type of policy element and a corresponding presentation element: the multi-value text box (multiText and multiTextBox, respectively). I would think that the existing list box element handles any case you might want this for, but maybe Microsoft got tired of dedicating Registry keys to lists of things, because the multi-value text box is backed by a REG_MULTI_SZ rather than a bunch of normal string values. It's not actually documented anywhere, but fortunately it looks pretty simple: the policy element only takes a Registry value, and the presentation element has no extra data. The hardest part of implementing it will just be adding support for multiple-string Registry values to the policy sources.

No comments:

Post a Comment