0
我想一個VBS變量作爲參數傳遞到我的批處理文件:通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
獲取錯誤的語法錯誤。
開始把蝙蝠的名稱和日期之間的空間:' strRun =「Batch1.bat」&nextday'。然後在.bat中選擇(唯一的)命令行參數:'... date =%1'。 – 2013-02-26 21:47:59
[從vbscript傳遞變量到批處理文件]的可能重複(http://stackoverflow.com/questions/2536695/passing-variable-from-vbscript-to-batch-file) – 2013-02-26 21:51:56