How to manage the settings of UWP apps

Gabor 21 Reputation points
2020-02-03T11:22:30.85+00:00

Hi colleagues,
how can we manage the settings of UWP apps in an enterprise environment?

Example:

  1. An UWP app is installed on 100+ computers for all users.
  2. User profiles might already exist, or will be created only later on the computer - when the user logs in for the first time.
  3. When user starts the app, SettingX for this app should be set to value Y. (Setting is in the Local Store)

In our case the App is the Microsoft Windows Camera App.

Another interesting question would be: what happens if the user changes this default setting? Are we allow him to do so, or deny?

Usually for traditional Win32 apps we would use either a file or registry values. Or for some apps GPOs.

I miss these kind of control for UWP apps.

Thanks for any help,
Gabor

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Richard Zhang-MSFT 6,936 Reputation points
    2020-02-04T01:00:27.737+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Accessing the registry in UWP is more difficult. But by comparison, it is more common to use LocalSettings, here is the document.

    Windows.Storage.ApplicationDataContainer localSettings =   
        Windows.Storage.ApplicationData.Current.LocalSettings;  
    // set  
    localSettings.Values["exampleSetting"] = "Hello Windows";  
    // get  
    Object value = localSettings.Values["exampleSetting"];  
    

    You can store user settings this way (you can also provide a default value when you first read the settings).

    Thanks.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.