-1
我試圖搜索我有的問題,但無法找到任何聯機。 她是我想做的事情:當我運行test.vbs文件時,我接受用戶輸入,然後將它傳遞給批處理文件。800A01C2 - 錯誤的參數數量或無效的財產分配
我得到這個錯誤:
800A01C2 - Wrong number of arguments or invalid property assignment
在VBScript代碼行4。
這裏是我的test.vbs代碼:
Set WshShell = CreateObject("WScript.Shell")
strInput = InputBox("Please enter the date (yyyymmdd)", "Enter Date")
set strInput = WScript.Arguments
WshShell.Run "mybatch.bat" & strInput, 0
只是一個簡單的代碼輸出從VBS傳遞到批處理文件中的參數:
echo Parameter = %1 > Var.txt
非常感謝。這樣可行! – Josie
@Josie如果你發現它解決了你的問題,請考慮[接受答案](http://meta.stackoverflow.com/a/5235)。 –