How to restrict a Windows UWP App to be installable only on Device memory

313 views Asked by At

The Windows Phone user can select the default location of installing the Apps to either Device or SD Card in the Storage settings.

Suppose my app is in the Windows Store and the user tries to install my app.

Case 1: The user doesn't have any SD Card in his phone. So everything goes to the Device. Perfect! This works for me.

Case 2: The user has SD Card but the location for App installation is set to Device by the user. This also works for me.

Case 3: The user has SD Card and the location for App installation is set to SD Card.This is where the problem exists!

For some reason, I want my App to be installable only on the Device's memory and not on SD Card.

Question: Is there something that I can add in the Package.appxManifest so that the Windows Store notifies the User that My App can only be installed on the Device's memory and not on SD Card. Is it possible to restrict my App installation only to Device's memory?

I have gone through many links but none of them talk on this specific use case.

Thanks for help!

2

There are 2 answers

1
Lindsay On BEST ANSWER

This is now specifically done during the package upload to the store.

App Declarations

Customers can install this app to alternate drives or removable storage. This box is checked by default, to allow customers to install your app to removable storage media such as an SD card, or to a non-system volume drive such as an external drive. If you want to prevent your app from being installed to alternate drives or removable storage, uncheck this box. Note that there is no option to restrict installation so that an app can only be installed to removable storage media. Note For Windows Phone 8.1, this was previously indicated via StoreManifest.xml.

1
Matteo Marciano - MSCP On

In the packaging options there is an option to prevent the installation on an external memory, but I don't remember exactly in which tab is found, nor how it's called.

Hope that helps.

Edit

Found it. You just have to check the "Prevent installation on SD cards" option from the Application tab in the manifest options.

See this tutorial for more informations.