【问题标题】:iot core error when use ProcessLauncher.RunToCompletionAsync execute process使用 ProcessLauncher.RunToCompletionAsync 执行进程时出现 iot 核心错误
【发布时间】: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 上运行

标签: c# uwp launcher


【解决方案1】:

您可能需要在 AppX 包中包含可执行应用程序。详细步骤可以参考这篇教程:

External process launcher.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2020-05-13
    • 1970-01-01
    • 1970-01-01
    • 2012-05-21
    • 2013-05-04
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多