0

I use desktop bridge convert my desktop application and deploy to windows store, when install the application from windows store, how to check if the application was start from windows store?

  • Possible duplicate of [Determine if C++ application is running as a UWP app in Desktop Bridge (Project Centennial)](https://stackoverflow.com/questions/39609643/determine-if-c-application-is-running-as-a-uwp-app-in-desktop-bridge-project) – Martin Prikryl Jan 17 '19 at 06:55
  • could you tell the reason you need to check if the application was start from windows store? – Nico Zhu Jan 18 '19 at 02:43

1 Answers1

1

In your application code at startup, check this property: https://learn.microsoft.com/en-us/uwp/api/windows.services.store.storeapplicense.skustoreid

If it has a value then the app came from the Store, if it has none it did not come from the Store.

You will need to reference the Windows.winmd file from the Windows SDK in order to call the API from your desktop application.

Stefan Wick MSFT
  • 13,600
  • 1
  • 32
  • 51
  • Two different questions. One is for checking whether the app is packaged as UWP or not. The other is about whether the app is store installed vs side-loaded. At least that's how I am reading the questions. – Stefan Wick MSFT Jan 23 '19 at 14:40