回答

0

我不知道這是不是最好的選擇,but an UWP app can read a file from the local storage
因此,在安裝後,我在本地存儲目錄(%USERPROFILE%\ AppData \ Local \ Packages \\ LocalState)中編寫了一個配置文件,我可以使用以下代碼從UWP應用程序訪問它:

Windows.Storage.StorageFolder storageFolder = Windows.Storage.ApplicationData.Current.LocalFolder; 
Windows.Storage.StorageFile configFile = await storageFolder.GetFileAsync("config"); 
String configContent = await Windows.Storage.FileIO.ReadTextAsync(configFile); 
//configContent now contains the config info