This code allows you to use a single VBScript for separate tasks by passing arguments e.g. SampleScript.vbs /task:argument01
Dim oArgs : oArgs = WScript.Arguments.Named.Item("task")
Select Case (oArgs)
Case "argument01"
WScript.Echo "Argument 1."
Case "argument02"
WScript.Echo "Argument 2."
Case Else
End Select
No comments:
Post a Comment