运行 来自 UWP 应用程序的外部 exe,解决沙盒模式
Run External exe from UWP app, workaround sandboxed mode
我有一个程序,我希望能够从我的 UWP 应用程序启动本地应用程序(例如 Spotify)。我在网上搜索了解决方案,因为 (Process.Start()) 不起作用。据我了解,出于安全和稳定性原因,UWP 应用程序有点沙盒化。但是有没有一种(简单的)方法来解决这个问题。
我只想要启动和关闭我自己的程序的能力 frame/Window。不需要 interact/send/recive 我的应用程序和外部程序之间的数据
并非所有应用都可以做到这一点。一些桌面应用程序处理协议启动,这可能是启动另一个应用程序的一种方式。 Spotify 实际上注册了一个协议,因此您可以这样做来启动它:
await Launcher.LaunchUriAsync(new Uri("spotify:"));
I have a program where i want to have the ability to launch a local
application (for example Spotify) from my UWP App.
您可以利用 Windows.System.ProcessLauncher
API.
这是一个关于how to launch an external process (exe) from a Universal Windows Platform (UWP) app的示例,您可以参考。
确保添加系统管理功能。
更多信息参考ProcessLauncher。
我有一个程序,我希望能够从我的 UWP 应用程序启动本地应用程序(例如 Spotify)。我在网上搜索了解决方案,因为 (Process.Start()) 不起作用。据我了解,出于安全和稳定性原因,UWP 应用程序有点沙盒化。但是有没有一种(简单的)方法来解决这个问题。
我只想要启动和关闭我自己的程序的能力 frame/Window。不需要 interact/send/recive 我的应用程序和外部程序之间的数据
并非所有应用都可以做到这一点。一些桌面应用程序处理协议启动,这可能是启动另一个应用程序的一种方式。 Spotify 实际上注册了一个协议,因此您可以这样做来启动它:
await Launcher.LaunchUriAsync(new Uri("spotify:"));
I have a program where i want to have the ability to launch a local application (for example Spotify) from my UWP App.
您可以利用 Windows.System.ProcessLauncher
API.
这是一个关于how to launch an external process (exe) from a Universal Windows Platform (UWP) app的示例,您可以参考。
确保添加系统管理功能。
更多信息参考ProcessLauncher。