简体   繁体   中英

Open application from Universal Windows(UWP)

So for our project, we have this app that's in the Windows Store. It is a Unity UWP app. At some point, we want to check if program X is installed on the user's machine. If yes, we want to launch it, if no we want to provide the user with a download link (or whatever.)

The app we want to launch, however, is a Unity standalone app. The user can download it from our website.

I tried multiple things. PlayerPrefs, Register checking etc. None of these really work. Register checking turned out to work decently well, but that only works between standalone apps. UWP apps seem to have no access to the Register.

Which left me thinking about URIs etc. But, I'm a complete noob regarding all of this and I have no clue how or where to start. Any help or direction is highly appreciated.

Ideal scenario:

User downloads our app from the Windows Store

  1. Users click a button within our app
  2. Our app checks the user's system for App X
  3. If App X is installed, we launch it, if not we do something else
  4. App X opens.

The UWP app cannot interact with the standalone Unity app directly.

You can write another standalone desktop “helper” app that does the actual work of checking the registry and launching the Unity app, and then make this “helper” app part of the UWP package and resubmit the package to the Windows Store.

Keep the “helper” app as simple as possible so it doesn't have other dependencies.

Use FullTrustProcessLauncher to launch the helper app when the user clicks the button.

And the UWP app needs to have runFullTrust capability in order to use FullTrustProcessLauncher.

runFullTrust is a restricted capacity and when you submit the app to the Windows Store it is required for you to specify the reason why the capacity is necessary for your app. See this answer for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM