There may be times when you need to determine if an 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) if 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.
public static bool IsAppAlreadyInstalled(string FullPackageFamilyName)
You need the full package name in order to call FindPackageForUser(). To get a list of all of packages currently installed, you can use the PowerShell command
For 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.
Code available here.