您可以从 Windows 10 通用应用程序调用外部应用程序吗?C# [英] Can you call an external application from a Windows 10 Universal application? c#

查看:32
本文介绍了您可以从 Windows 10 通用应用程序调用外部应用程序吗?C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

过去一周我一直在研究 Minecraft 服务器包装器.我期待制作一个 Windows 10 通用应用程序,但在我的学习和测试中,我发现 Windows 8 商店应用程序不支持 System.Diagnostics.Process.在尝试将代码添加到我的 Win 10 开发机器的 10 项目中时,我被告知无法解决.

I have been working on a Minecraft server wrapper for the past week. I was looking forward to making a windows 10 universal app, but in my learning and testing I discovered that System.Diagnostics.Process is not supported in windows 8 store apps. When trying to add the code to my Win 10 dev machine in a 10 project I am being told that it cant be resolved.

有没有办法启动外部进程并将输出捕获到带有 Win10 通用应用程序的文本框中,或者我不走运?

Is there going to be a way to launch an external process and capture the output into a textbox with Win10 Universal apps or am I out of luck?

推荐答案

您的目标应用将需要支持应用服务才能执行此操作.无法启动和控制任意应用程序.如果目标应用程序设计为应用程序服务,则您可以启动它并与 Launcher 进行通信.LaunchUriForResultsAsync

Your target app will need to support app services to do this. It isn't possible to launch and control arbitrary apps. If the target app is designed as an app service then you can launch and communicate it with Launcher.LaunchUriForResultsAsync

有关应用服务的更多信息,请参阅构建会话应用到应用通信:构建应用网络

For more on app services see the Build session App-to-App Communication: Building a Web of Apps

这篇关于您可以从 Windows 10 通用应用程序调用外部应用程序吗?C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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