I then found that though Home editions have some ADMX templates (and Policy Plus loads them fine), it's missing a lot of the more interesting ones. Fortunately, ADMX files can be downloaded legitimately from Microsoft for free, and Policy Plus is happy to load them from any folder.
When I tried to save some changes to the local GPO (which doesn't exist by default on Home), the program crashed because it couldn't find gpt.ini. I added a check for that; now that file will be automatically created if it's missing. I also discovered that Home editions do have gpsvc.dll - the file I was testing for to determine Pro status - but not secpol.msc, so that path test has been changed.
When testing the Registry diff-and-apply routine, I found that instead of being converted to the appropriate object type, POL entries were being passed to the Registry functions as byte arrays (whoops).
Then the big test: whether Windows Home actually cares about these Registry entries. It does, at least with the ones I've tried! RefreshPolicyEx doesn't throw on Home, but it doesn't do anything either, so a reboot or logon/logoff cycle is needed for computer or user settings (respectively) to take effect. The goal of working on all Windows editions is accomplished!
Running perfectly on Windows 7 Home Premium |
The changes are live on GitHub.
No comments:
Post a Comment