Powershell "The system cannot find the path specified"- 最小示例

标签 powershell

无法重现,似乎是本地环境问题:

bla.bat 文件包含以下内容:

@echo off

所以这个脚本实际上应该什么都不做。现在,当尝试从 PowerShell 执行脚本时,输出如下:

PS C:\Users\lwnjup2> .\bla.bat
The system cannot find the path specified.

而在 CMD 中,bat 文件执行时异常(不执行任何操作...)。

所以我的问题是:为什么会出现这个奇怪的警告?有没有办法获得更多输出(即找不到什么路径)?对我来说,在执行任何 .bat(或 .cmd)文件时,PowerShell 似乎总是搜索某个路径。

PS:奇怪的是,我无法在另一台机器上重现行为,所以看来我搞乱了我的 powershell 环境......

最佳答案

解决方案与 cmd.exe 相关,位于

Windows CMD.exe "The system cannot find the path specified."

我还有一些自动启动的值(value)...

关于Powershell "The system cannot find the path specified"- 最小示例,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54924562/

相关文章:

shell - Shell和PowerShell中的IPV6地址缩短

mysql - 脚本在执行需要很长时间的查询后挂起

powershell - Azure PowerShell 虚拟机警报电子邮件功能

PowerShell RSA 解密

session - 将变量传递给远程 session 中使用的几个脚本 block Powershell

powershell - 在 Powershell 中发送 key alt+n {TAB} {ENTER}

powershell - 如何创建 powershell 2.0 模块?

powershell 脚本太慢(文件枚举)

asp.net - 如何查找 IIS 功能的名称

java - 我想以管理员身份运行 PowerShell 并通过 Java 在管理员电源 shell 中执行命令