There may be times when you need to determine if a Microsoft Store app has been installed. You may have a dependency on that app or otherwise need to take action based on the presence of that app.
The API PackageManager.FindPackageForUser() can do this. See the code below. Note the special handling for the various error conditions. This API returns a Package object if the app is installed for the current user. The API will throw an Access denied exception if 1) the app is not installed on the machine or 2) it is on the machine but not installed for the current user. The API will throw an Argument exception if the string for the package family name is not in the correct format.
Full App Package Name
You need the full package name to call FindPackageForUser(). To get a list of all of the packages currently installed, you can use the PowerShell command
For the Microsoft Store apps that you have published, you can get the full package family name from the App Identity page in Partner Center. See screenshot below.
Please let me how this method works for you or if you have another solution for determining the installation status of an app on Windows 10.
The code is available here.