You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何阻止调用FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync时打开控制台窗口

阻止FullTrustProcessLauncher启动时弹出控制台窗口的方法
  • 修改控制台应用的输出类型:若你的全信任进程是控制台项目,右键项目→属性→应用程序→输出类型,将「控制台应用程序」改为「Windows应用程序」。编译后启动将不再弹出控制台窗口,且不影响后台运行逻辑。

  • 配置进程启动参数:若需手动控制进程启动逻辑,可在启动时设置CreateNoWindow为true,同时将UseShellExecute设为false,示例代码:

var startInfo = new ProcessStartInfo("你的全信任进程路径.exe")
{
    CreateNoWindow = true,
    UseShellExecute = false
};
Process.Start(startInfo);
  • 核对打包配置:在MSIX打包项目中,打开Package.appxmanifest,找到Extensions下的desktop:Extension节点,确保Executable指向已改为Windows应用程序类型的exe文件,且EntryPoint配置正确。

内容的提问来源于stack exchange,提问作者Pete

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.25 21:04:54