How to check if app was launched from the Microsoft store

Gilad Noy 46 Reputation points
2023-06-04T22:13:39.5166667+00:00

Hi,

I'm making a UWP app that will be preinstalled on some PCs (i.e. will be installed on the machine when the user starts using the PC for the first time).

The app can also be downloaded from the Microsoft store.

Is there a way to determine whether the app was initially launched from the preinstallation or from the Microsoft store.

I know we can create 2 separate versions and check based on that, but from what I tested, there is still an "Open" button available on the store page of the app (even if it's updatable), which launches the existing preinstalled version.

Is there any indication inside the app for the open action from the store page?

Thanks,

Gilad.

Universal Windows Platform (UWP)
{count} votes

Accepted answer
  1. Junjie Zhu - MSFT 15,211 Reputation points Microsoft Vendor
    2023-06-05T06:49:22.5766667+00:00

    Hello @Gilad Noy ,

    Welcome to Microsoft Q&A!

    I searched for API documentation related to installation and launch, and there is currently no API for checking if app was launched from the Microsoft store.

    Thank you.


0 additional answers

Sort by: Most helpful