Before you can use Exists or any other WshNamed method or property, you need to retrieve the WshNamed collection. To do so, you use the WshArguments' Named property. If the caller didn't specify any named arguments on the command line, the Named property returns an empty collection.
To retrieve a named argument in WshNamed, you use the Item property. You use WshNamed's Item property in a slightly different way than I used WshArguments' Item property earlier. With WshNamed's Item property, you don't use a 0-based index but rather a string that evaluates to the argument's name, as the code at callout A in Listing 2 shows. This code retrieves the value of the named argument called server. Notice that the argument's name doesn't include the leading slash or the trailing colon. You don't use these characters when working with a named argument in a script; you use them only when you enter a named argument on the command line. Also notice that the code doesn't include the Item property. Like WshArguments' Item property, WshNamed's Item property is the default, so you can omit it in VBScript code. . . .