Vbscript 将vbs变量传递到批处理文件

Vbscript 将vbs变量传递到批处理文件,vbscript,dos,Vbscript,Dos,我正在尝试将vbs变量作为参数传递到批处理文件中: vbs代码: Set WShShell = CreateObject("WScript.Shell") dim nextday nextday= DateAdd("d",1,dtmStart) strRun = "Batch1.bat" & nextday WshShell.Run(strRun) 批次代码: "C:\AscendQrx\bselstmt.exe" NOCONFIRM DATABASE=ddd var=ccc date

我正在尝试将vbs变量作为参数传递到批处理文件中:

vbs代码:

Set WShShell = CreateObject("WScript.Shell")
dim nextday
nextday= DateAdd("d",1,dtmStart)
strRun = "Batch1.bat" & nextday
WshShell.Run(strRun)
批次代码:

"C:\AscendQrx\bselstmt.exe" NOCONFIRM DATABASE=ddd var=ccc date=nextday

获取错误语法错误

为什么不从vbscript运行命令,而不是调用批处理文件?在我变得更熟悉如何使用之前,我也做过同样的事情。跑步

试试这个,让我知道

Set WShShell = CreateObject("WScript.Shell")
dim nextday
nextday= DateAdd("d",1,dtmStart)
strRun = "C:\AscendQrx\bselstmt.exe NOCONFIRM DATABASE=ddd var=ccc date=" & nextday
WshShell.Run(strRun)

首先在.bat的名称和日期之间留出一个空格:
strun=“Batch1.bat”&nextday
。然后在.bat中选择(一个也是唯一的)命令行参数:
。。。日期=%1
。可能存在的重复项