无法重现,似乎是本地环境问题:
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/