Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';t从批处理文件启动程序。Windows找不到该文件_Windows_Batch File_Cmd - Fatal编程技术网

Can';t从批处理文件启动程序。Windows找不到该文件

Can';t从批处理文件启动程序。Windows找不到该文件,windows,batch-file,cmd,Windows,Batch File,Cmd,所以我试图同时启动多个程序,我有一个带有这个命令的批处理文件 Start "My Program" "E:\Path1A\Path1B\Program1.exe" Start "My Program Also" "E:\Path1A\Path2A\Path2B\Program2.exe" options" 弹出窗口显示: Windows cannot find 'E:\Path1A\Path1B\Program1.exe' Make sure you typed the name correc

所以我试图同时启动多个程序,我有一个带有这个命令的批处理文件

Start "My Program" "E:\Path1A\Path1B\Program1.exe"
Start "My Program Also" "E:\Path1A\Path2A\Path2B\Program2.exe" options"
弹出窗口显示:

Windows cannot find 'E:\Path1A\Path1B\Program1.exe' Make sure you typed the name correctly, and then try again.

Windows cannot find 'E:\Path1A\Path2A\Path2B\Program2.exe' Make sure you typed the name correctly, and then try again.

这是在Windows 8.1上运行的。我仔细检查了路径,它是正确的。这是怎么回事?

尝试不使用
start
。像这样:

"E:\Path1A\Path1B\Program1.exe"
"E:\Path1A\Path2A\Path2B\Program2.exe" options

您的文件不在该文件名所在的位置。这就是特定错误消息告诉您的

如果路径或文件名中有非拉丁字符,则它们可能是问题所在

此外,这一行中有不平衡的双引号:

Start "My Program Also" "E:\Path1A\Path2A\Path2B\Program2.exe" options"
尝试如下

START "My Program" /D "E:\Path1A\Path1B\" Program1.exe
START "My Program Also" /D "E:\Path1A\Path2A\Path2B\" Program2.exe "options"

.exe
,而不是
.exe。
(请注意删除尾随的
)。抱歉。那是个打字错误。我刚刚编辑了这个问题。批处理文件没有句点@MarcBAre你确定这是一个
.exe
文件吗?默认情况下,Windows隐藏已知文件类型的扩展名,因此可能是您不小心将其命名为
Program.exe.bat
或其他名称。@Adam yes。我已将Windows设置为不隐藏扩展名,因此我确定它不能是exe.exe。第二个路径确实存在问题,因为您的选项必须位于引用的路径之后,而不是在引用的路径内。我不知道第一个怎么了。我首先在批处理文件中执行
如果不存在“E:\…\Program1.exe”echo fail
。如果打印“fail”,则您的路径错误。结果是:“E:\Path1A\Path1B\Program1.exe”未被识别为内部或外部命令、可操作或批处理文件。”E:\Path1A\Path2A\Path2B\Program2.exe选项“系统找不到指定的路径。这归结为-第一个文件名有问题,第二个文件名有问题(Path2A\Path2B)。从这条评论来看,你似乎没有用引号括起来——它是否包含空格?@是的。路径有空格。我也在它周围加了引号。