【问题标题】:In powershell via RDP RemoteApp, why does `start firefox` work, but `start chrome` not work?在通过 RDP RemoteApp 的 powershell 中,为什么 `start firefox` 工作,但 `start chrome` 不起作用?
【发布时间】:2015-10-12 08:15:24
【问题描述】:

如果我对远程机器执行 RDP,从开始菜单打开 Powershell,然后启动 Chrome,它将正确启动,即打开一个新窗口,使用以下命令:

start chrome

我已将 Powershell 配置为远程应用程序。当我登录到 RemoteApp 时,我可以进入

start firefox
start calc
Start-Process calc

并且这些应用程序都出现在 RDP 客户端上,正如我所期望的那样。但是

start chrome

什么都不做。我没有收到任何错误,窗口根本不显示。截至 2015 年 10 月,一切都是最新的。

【问题讨论】:

    标签: google-chrome powershell rdp


    【解决方案1】:

    使用 PowerShell,startStart-Process 的别名。这个 Cmdlet 使 对Shell.ShellExecute 的低级调用如下:

    1. 启动火狐
    2. 启动进程 firefox
    3. 启动进程 firefox.exe
    4. PATH 上搜索 firefox.exe
    5. 应用路径上搜索 firefox.exe

    很可能发生的事情是 Firefox 位于 App Paths 上,而 Chrome 位于 不是。

    Run box special folders

    【讨论】:

    • 但是如果是找不到可执行文件的问题,我不会收到错误吗?如果我运行 start foo 我会得到一个错误。
    • 我没有 Chrome,我也不打算安装它来解决这个问题,即使在虚拟机上也是如此。对不起队友
    • 不用担心...感谢您的尝试。顺便说一句,我检查了一下,chrome 在 App Paths 中。
    猜你喜欢
    • 2020-10-24
    • 2021-07-10
    • 2018-06-15
    • 1970-01-01
    • 1970-01-01
    • 2014-11-30
    • 1970-01-01
    • 2019-08-16
    • 2017-08-15
    相关资源
    最近更新 更多