O'Reilly logo

Microsoft® Windows® Scripting Self-Paced Learning Guide by Ed Wilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using Multiple Arguments

In pingMultipleComputers.vbs, you use only one argument, which you assigned to the variable strMachines by using this command:

strMachines = WScript.Arguments.Item(0)

When you look at the command, you see that it’s made up of several parts:

Variable

=

WScript.Arguments.Item

Item #

strMachines

=

WScript.Arguments.Item

(0)

If you need to use multiple arguments or multiple items (whichever term you prefer), you simply add another line and increment the item number contained within the parentheses.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required