I have the ProductId for an app:
https://apps.microsoft.com/store/detail/msn-weather/9WZDNCRFJ3Q2
Where the ProductId is 9WZDNCRFJ3Q2. This is used by AppInstallManager to programmatically install from Store.
I would like to know if an app is already installed, based on its ProductId alone. Is it possible to find a package on a device given only the ProductId?
Is it possible to find a package on a device given only the ProductId?
No, you can't find the app via the ProduceID. There is no API could do that.
If you could get the packageFullName
of the target app, there is another option for you to find if an app is installed on the device. The PackageManager Class contains 4 different methods which could find specific packages installed on the device.
These methods require the packageFullName
as the parameter. And you need to call these APIs in a desktop application because these methods require administrative privileges.