huyinjie

无法在 PowerShell 里启动 CMD

  •  
  •   huyinjie · Jul 3, 2017 · 4678 views
    This topic created in 3426 days ago, the information mentioned may be changed or developed.

    提示如下

    cmd : 无法将“ cmd ”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确
    
    10 replies  •  2017-07-04 12:12:21 +08:00
    iVeego
    iVeego
    Jul 3, 2017 via Android
    1
    .\cmd 试试?
    huyinjie
    huyinjie
    OP
    Jul 3, 2017
    2
    @iVeego 还是相同的报错
    tghgffdgd
    tghgffdgd
    Jul 3, 2017
    3
    你确定环境变量没问题吗,先试下完整路径行不行
    huyinjie
    huyinjie
    OP
    Jul 3, 2017
    4
    @tghgffdgd 找另一台同版本 Win10 对比了下没问题,PowerShell 完整路径是什么呢
    tghgffdgd
    tghgffdgd
    Jul 3, 2017
    5
    @huyinjie 你是要在 ps 里启动 cmd,这里是说 cmd 的路径,c:\windows\system32\cmd.exe 如果可以那应该是环境变量问题,不行那就确认下文件还在不
    imn1
    imn1
    Jul 3, 2017
    6
    cmd.exe
    geelaw
    geelaw
    Jul 3, 2017 via iPhone
    7
    你的系统可能有点 beyond repair 了……?
    imn1
    imn1
    Jul 3, 2017
    8
    啊,我知道了,你不是在 powershell console,是在 PS ISE 里面运行吧?
    lslqtz
    lslqtz
    Jul 4, 2017
    9
    @imn1 我在 ISE 是这样的:
    PS C:\Users\lslqtz> cmd
    无法启动“ cmd ”。不支持交互式控制台应用程序。
    若要运行该应用程序,请使用 Start-Process cmdlet,或者使用“文件”菜单中的“启动 PowerShell.exe ”。
    若要查看 /修改被阻止的控制台应用程序,请使用 $psUnsupportedConsoleApplications,或者查阅联机帮助。
    At line:0 char:0
    huyinjie
    huyinjie
    OP
    Jul 4, 2017❤️2
    10
    @lslqtz @geelaw @tghgffdgd @iVeego @imn1
    在系统变量里添加这两个路径后修复了问题
    ```
    C:\WINDOWS\System32\
    C:\WINDOWS\System32\WindowsPowerShell\v1.0\
    ```
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1060 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 23:04 · PVG 07:04 · LAX 15:04 · JFK 18:04
    ♥ Do have faith in what you're doing.