Windows 通过批处理脚本调用.exe文件时出现问题

Windows 通过批处理脚本调用.exe文件时出现问题,windows,batch-file,exe,Windows,Batch File,Exe,通过批处理脚本调用.exe文件时出现问题。下面是我的批处理脚本代码: @echo off for /F "tokens=* delims=" %%A in (MyFile.csv) do start " "diffapicmdline.exe /lhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 %%A" /rhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 Prjct %

通过批处理脚本调用.exe文件时出现问题。下面是我的批处理脚本代码:

@echo off
for /F "tokens=* delims=" %%A in (MyFile.csv) do start " "diffapicmdline.exe /lhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 %%A" /rhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 Prjct %%A" /t job /ot html /ol "C:\compare_output_H_S_Component.html""
因此,对于
MyFile.csv
文件中的每一行,每次都应调用
diffapicmdline.exe

但问题是它无法识别.exe之后的参数。我们是否必须转义字符或找到其他方法来告诉批处理脚本成功运行.exe

我在这里收到的错误:

Windows can't find 'diffapicmdline.exe /lhscd "/d=localhost:9080'. 
Make sure you typed the name correctly, and then try again.

这样做会更好吗,在线调用exe而不是启动新的CMD进程

@echo off
for /F "tokens=* delims=" %%A in (MyFile.csv) do diffapicmdline.exe /lhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 %%A" /rhscd "/d=localhost:9080 /h=localhost /u=user1 /p=Pwd123 Prjct %%A" /t job /ot html /ol "C:\compare_output_H_S_Component.html"

do start“”“diffapicmdline.exe
:这个有趣的引用模式是什么?这是故意的吗?您能编辑问题并粘贴错误消息吗?@kebs diffapicmdline.exe是IBM提供的一个实用程序,用于比较不同主机上的DataStage作业。其目的仅限于其预期格式。当我在cmd中单独执行相同的命令时,它的工作非常完美。但是我想利用相同的批处理脚本来自动比较作业。这不是我要问的,也与问题无关。我的问题是为什么有三个:
?使用
start”“[\path\to\]executable.exe”[可执行文件的参数]
;在
start
命令行中有许多引号
;这里的第一个
构成一个空字符串,告诉
开始
将其用作窗口标题;如果省略它,
start
可能会尝试将可执行文件路径/名称作为标题,将其第一个参数作为要运行的可执行文件,这肯定会失败。。。