详细了解脚本请参考:脚本学习及应用分享 — 批处理和脚本的交互
简单代码示例:
CommandLine: path\cscript.exe xxx.vbs helloworld
VBSCode: Set args = WScript.Arguments
If args.Count = 1 Then
test= WScript.Arguments(0)
MsgBox "test " & name
End If
If args.Count = 1 Then
test= WScript.Arguments(0)
MsgBox "test " & name
End If
Msgboxshow: test helloworld