if wscript.arguments.count <> 2 then wscript.echo "Usage : " & wscript.scriptname & " " wscript.echo " is some unique 4 digit number (IP address of printer?)" wscript.quit(1) end if Dim queue, port queue = wscript.arguments(0) port = wscript.arguments(1) Set objWMIService = GetObject("winmgmts:") Set objNewPort = objWMIService.Get ("Win32_TCPIPPrinterPort").SpawnInstance_ objNewPort.Name = "LPR_"& queue ' Name seen by the user? objNewPort.Protocol = 2 ' LPR and not RAW objNewPort.HostAddress = "printserver.cs.uchicago.edu" ' The host which has the queues objNewPort.Queue = queue ' The name of the queue objNewPort.PortNumber = port ' Local Port number this binds to objNewPort.SNMPEnabled = False objNewPort.ByteCount = True ' Enable SNMP Byte Count ' No clue what the above is, except that if false doesn't work. objNewPort.Put_