以輸入參數的方式帶入

Set args = WScript.Arguments
WScript.Echo (args.Item(0) & args.Item(1)) 

 檢查是否有輸入參數

if WScript.Arguments.Count = 0 then 
    WScript.Echo "Missing parameters" 
end if 

 

http://stackoverflow.com/questions/2806713/can-i-pass-an-argument-to-a-vbscript-vbs-file-launched-with-cscript

http://technet.microsoft.com/en-us/library/ee156604.aspx

arrow
arrow
    全站熱搜

    igogo 發表在 痞客邦 留言(0) 人氣()