【问题标题】:How to make background window not appear while executing powershell script执行powershell脚本时如何使后台窗口不出现
【发布时间】:2013-01-15 22:59:26
【问题描述】:

每当我执行 gui powershell 脚本时,除了 gui form 之外,还会出现背景窗口(一个命令窗口);如何消除这种情况,我应该以其他方式执行脚本吗?

-> 如果对此有任何其他问题,请告诉我。

【问题讨论】:

    标签: user-interface powershell executable


    【解决方案1】:

    尝试使用-windowstyle 参数创建一个调用脚本的快捷方式:

    powershell.exe -sta -WindowStyle Hidden ".\myGUIscript.ps1"
    

    这个运行 powershell 控制台然后关闭它但让 GUI 继续他的工作

    【讨论】:

      猜你喜欢
      • 2019-12-12
      • 1970-01-01
      • 2019-04-18
      • 2017-07-29
      • 1970-01-01
      • 2021-09-09
      • 1970-01-01
      • 2011-05-12
      • 1970-01-01
      相关资源
      最近更新 更多