albin.f.johansson
albin.f.johansson

Reputation: 43

Run External exe from UWP app, workaround sandboxed mode

I have a program where i want to have the ability to launch a local application (for example Spotify) from my UWP App. I have searched the web for a solution as (Process.Start()) doesn't work. As i have understood the UWP applications is kind of sandboxed for saftey and stability reasons. But is there a (simpel) way to work around this.

I only want the ability to start and close a program inside my own frame/Window. No need to interact/send/recive data between my applications and the external program

Upvotes: 2

Views: 4077

Answers (2)

Rita Han
Rita Han

Reputation: 9700

I have a program where i want to have the ability to launch a local application (for example Spotify) from my UWP App.

You can utilize Windows.System.ProcessLauncher API.

Here is a sample about how to launch an external process (exe) from a Universal Windows Platform (UWP) app you can reference.

Make sure add systemManagement capabiity.

For more information reference Process​Launcher.

Upvotes: 1

Michael S. Scherotter
Michael S. Scherotter

Reputation: 10785

That is not possible with all apps. Some desktop apps handle protocol launches and that can be a way of launching another app. Spotify actually has a protocol registered so you could do this to launch it:

await Launcher.LaunchUriAsync(new Uri("spotify:"));

Upvotes: 5

Related Questions