Код для установки и проверки параметров командной строки
? Use the Named Arguments collection for the command-line arguments. ? The WshArguments object is in WSH 5.6 and later. Set objArgs = WScript.Arguments.Named strRptFileName = objArgs.Item(«f») strRegFileName = objArgs.Item(«r») If WScript.Arguments.Named.Count < 2 Then WScript.Echo «You must specify a csv file name « & VBCrLf & _ «of a file created by ComputerSearch.vbs and « & VbCrLf & _ «the name of the .reg file to apply.» & VbCrLf & VbCrLf & _ SampleCommandLine() WScript.Quit End If