[UWP]如何启动位于特定目录中的exe文件? [英] [UWP] how to start an exe file that is located in specific directory?

查看:71
本文介绍了[UWP]如何启动位于特定目录中的exe文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从UWP应用程序启动位于C:/ Program Files(x86)/ App /中的exe。 UWP应用程序位于不同的目录C:/ Program Files(x86)/ UWPApp /。是否可以这样做?



我尝试过:



我可以使用Windows桌面扩展程序为UWP启动exe文件,添加

I am trying to start an exe that is located in C:/Program Files (x86)/App/ from UWP app. The UWP app is located in different directory C:/Program Files (x86)/UWPApp/. Is it possible to do that?

What I have tried:

I can start exe file by using Windows Desktop extension for UWP, add

  <Extensions>
        <desktop:Extension Category="windows.fullTrustProcess"            Executable="Assets\app.exe" />
</Extensions>



到Package.appmanifest并调用此


to Package.appmanifest and call this

await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync();

。但我需要将app.exe添加到项目的Assets目录中

我的问题是如果exe文件位于特定目录(例如,C:/ Program Files(x86)/ App /),可以UWP直接启动exe文件。

谢谢

in main class. But I need to add app.exe to Assets directory of project
My question is if exe file is located in a specific directory (ex,C:/Program Files (x86)/App/), can UWP directly start exe file.
Thanks

推荐答案

我现在看到的唯一解决方案就是搜索.exe并在启动时启动它你找到它。不可能只启动可执行文件而不知道它可以在何处找到。文件系统有充分理由的文件夹
Only solution that I see now is that you search for the .exe and start it when you find it. It is not possible to just start an executable and not telling where it can be found. The file system has folders for a good reason


这篇关于[UWP]如何启动位于特定目录中的exe文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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