【发布时间】:2018-04-17 01:44:48
【问题描述】:
我想从我的程序运行另一个程序 我的代码是
var options = new ProcessLauncherOptions();
var standardOutput = new InMemoryRandomAccessStream();
var standardError = new InMemoryRandomAccessStream();
options.StandardOutput = standardOutput;
options.StandardError = standardError;
await ProcessLauncher.RunToCompletionAsync(@"C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\930e206e-dd28-4760-84b2-f3a1f74801feVS.Debug_ARM.Mostafa.Bagheri\Jamsaz.InjectionWeights.exe", "", options);
当我在 vs 2017 中运行时出现以下错误
此应用程序只能在应用程序容器的上下文中运行。 (来自 HRESULT 的异常:0x8007109B) Error Image
【问题讨论】:
-
我在文件 reg.exe 上添加执行权限到注册表 ADD "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\EmbeddedMode\ProcessLauncher" /v AllowedExecutableFilesList /t REG_MULTI_SZ /d "C:\Data\Users \DefaultAccount\AppData\Local\DevelopmentFiles\930e206e-dd28-4760-84b2-f3a1f74801feVS.Debug_ARM.Mostafa.Bagheri\Jamsaz.InjectionWeights.exe"\0
-
我在调试模式下运行 Visual Studio
-
你的程序是 UWP 应用吗?
-
Hi Yes 是 Uwp 应用程序并在 Raspberry Pi 上运行