2

Can a UWP App access data outside its own app data, publisher data, or what the user picks with the FilePicker?

As far as I can tell, a shared publisher area and a user prompt with the FilePicker are the only ways to access files outside a UWP app's own personal app data stores. Registry settings are sandbox'd, as are environment variables.

I'd like to pass data from one UWP app to another as plain-text non-executing and read-only if it's possible, but it doesn't seem like it is so far from my research. Have I missed anything?

2

This changed with the 1803 release of Windows 10. You need to request the permission broadFileSystemAccess in your manifest.

The documentation is here: https://docs.microsoft.com/en-us/windows/uwp/packaging/app-capability-declarations

  • But broadFileSystemAccess seems to allow access to all files on the system. Is there a way we can only allow access to specific folder , say, C:\TestFolder. The intent is that this folder has files that my app needs to access but app should not be able to access any file on any other folder other than the one from the app's sandbox. And the size of the TestFolder is too big to be included into the app. – nam May 29 at 16:57
2

According to this reference you might be able to use the Downloads Folder for this purpose.

You can declare more access required using App Capability Declarations to expand your UWP sandbox. Just know that anything beyond the small default sandbox requires the user to acknowledge your app is requesting those features. The user can opt to disallow access.

The App Capability Declarations can allow you access to specific types of data (Music, Pictures, Video), all files on the file system, or specific devices. As a user I would request that you try to limit your access to whatever is truly needed and defensible.

  • They finally granted access to the filesystem with the 1803 update, though I suspect (or at least hope) that includes restrictions on what you can do with those files, ie execution policies preventing malicious scripts. Otherwise... shrug haha! – kayleeFrye_onDeck Mar 5 at 3:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.