Reputation: 1975
I have a C# Windows program that is reading custom group policy settings, set by Administrator with ADMX. Currently, the app is directly reading the registry values that reflect the group policy settings.
Now, I want to make a pure-UWP version of this app (preferably without using Desktop Bridge), which should be installed directly from Microsoft Store. I already saw in another question that this kind of apps cannot access Windows' registry. However, specifically for Group Policy there might be a dedicated API - but it's not well documented (see here).
So - is there any way for a pure UWP app to read the group policy settings?
Upvotes: 1
Views: 495
Reputation: 32775
Reading Group Policy settings from pure UWP app
Currently, UWP does not support access Group policy directly. As mentioned from this case reply, you could make Brokered Windows Runtime Component
or desk-bridge to access regedit indirectly. For pure UWP app, it could not do it, and if you do want this feature please feel free post your requirement with Windows Feed Hub app.
Update
Currently, there not such api that could access Group Policy directly within uwp platform. But the WACK list for APIs was updated to allow the registry APIs. (Actually, they will work on ANY version of Windows 10, not just 1809) that means you could use win32 api to access Group Policy. You could look at pinvoke for C# wrappers if you want to use from managed code. And please note if you have used pinvoke in your UWP app, it will not be allowed to publish to store.
Upvotes: 1