有人可以给我一个基本的骨架工具,允许我运行不同的命令行参数。
例如
cscript TestSpeed.vbs /Internet
'or
cscript testSpeed.vbs /RW
答案 0 :(得分:0)
Option Explicit
WScript.Quit Main()
Function Main()
Main = 1
Dim oWAN : Set oWAN = WScript.Arguments.Named
Select Case True
Case 1 <> oWAN.Count
WScript.Echo "Usage: cscript TestSpeed.vbs /Internet OR /RW"
Case oWAN.Exists("Internet")
WScript.Echo "Test Internet speed"
Main = 0
Case oWAN.Exists("RW")
WScript.Echo "test RW speed"
Main = 0
End Select
End Function