UWP 应用中由 URI 启动的应用是否也被沙盒化了? [英] Are apps launched by URI in a UWP app also sandboxed?

查看:25
本文介绍了UWP 应用中由 URI 启动的应用是否也被沙盒化了?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我继承了一个 UWP 应用程序,并被要求添加一个按钮来启动一个 3rd 方应用程序.第 3 方应用程序是用 Qt 构建的,并有一个 exe 作为主程序,它启动作为服务的第二个 exe.UWP 应用将在运行 Windows 10 的平板电脑上运行.

I inherited a UWP app and was asked to add a button to launch a 3rd party application. The 3rd party application is built with Qt and has an exe as the main program that launches a second exe that acts as a service. The UWP app is to be run on tablets running Windows 10.

我创建了一个安装程序,为 3rd 方应用程序的 URI 添加注册表值,以便我可以进行 URI 激活(LaunchUriAsync 方法).如果我将 URI 的目标更改为其他应用程序,它会正常工作,因此我知道 URI 设置正确.

I created an installer that adds registry values for the URI for the 3rd party application so I can do URI activation (LaunchUriAsync method). If I change the target of the URI to a different application it works fine, so I know the URI is setup properly.

当我点击按钮时,第 3 方应用程序没有打开.我使用 ProcMon 来查看发生了什么,并确认它开始打开但在启动第二个 exe 之前停止.不会将任何内容写入事件日志,因为那太有用了.

When I hit the button the 3rd party application does not open. I used ProcMon to see what was happening and confirmed that it begins opening but then stops before launching the second exe. Nothing is written to the event log because that would be too helpful.

我没有找到任何关于此的文档,但我必须假设从 UWP 应用程序启动的应用程序也是沙盒化的.有谁知道这是否正确?除了将应用程序重建为 WPF 或其他东西之外,我不知道还能做什么,这不是很吸引人.

I haven't found any documentation about this, but I have to assume that an application launched from a UWP app is also sandboxed. Does anyone know if this is correct? I'm not sure what to do other than rebuild the app as WPF or something and that isn't very appealing.

推荐答案

您的问题的答案是:不,它们没有在沙盒中运行.

The answer to your question is: no, that they are not being run sandboxed.

启动一个通过协议从 UWP 完全信任运行的应用是一种受支持的场景(例如,如果 Outlook 是您的默认 mailto: 提供商,这就是撰写电子邮件的方式).

Launching an app that runs in fulltrust from a UWP via protocol is a supported scenario (e.g. that's how composing email works if Outlook is your default mailto: provider).

我怀疑您的协议注册或您如何调用它时缺少某些内容,但问题中没有足够的细节来解决此问题.

I suspect that is something missing in your protocol registration, or how you invoke it, but there is not enough detail in the question to troubleshoot this.

这篇关于UWP 应用中由 URI 启动的应用是否也被沙盒化了?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆