【发布时间】:2013-07-14 11:58:28
【问题描述】:
此命令有效
START /b /wait "Dummy title" "C:\tmp\test runner2.bat" arg1 arg2
但这两个都失败了!
START /b /wait "Dummy title" "C:\tmp\test runner2.bat" arg1 arg2 "arg 3" arg4
START /b /wait "Dummy title" "C:\tmp\test runner2.bat" arg1 arg2 "arg 3"
错误是:
'C:\tmp\test' is not recognized as an internal or external command, operable program or batch file.
显然它与围绕参数的" 有关,但为什么以及如何解决这个问题?
相关问题:
【问题讨论】:
-
不启动也行吗?
"C:\tmp\test runner2.bat" arg1 arg2 "arg 3" arg4 -
使用
call,而不是start,从其他批处理脚本运行批处理脚本。 -
@AnsgarWiechers 我只是想弄清楚该命令是否按原样工作。如果它不能按原样工作,很可能它不适用于
start或call或其他任何东西。 -
@devnull 它适用于
call。 -
如果命令不是批处理脚本(而是 .exe 文件)怎么办?那么
CALL就不行了,对吧?我尚未对其进行测试,但我认为即使是这种情况,原始问题仍然存在?
标签: windows batch-file command-line-arguments