Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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.
like image 503
Patrick Avatar asked Mar 17 '26 18:03

Patrick


1 Answers

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.

like image 178
kennyzx Avatar answered Mar 20 '26 06:03

kennyzx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!