Archived from groups: microsoft.public.windowsnt.print (More info?)
I want to be able to reimage a PC, then use a script to add an TCP/IP
Printer. Here is what I have but it adds the ip address as a local port
instead of a TCP/IP Port. I've already tried change the "oPort.PortType" to
different numbers but no luck, any help would be greatly appreciated. Also
note I'm an extremely new to scripts. Thanks again.
'******** Register prnadmin.dll file on client computer *******
Set WshShell = Wscript.CreateObject("Wscript.Shell" )
'************** Create the printer second ***************************
'Change MyPrinter to the name of the printer that you are adding.
'Change PrinterDriver to the name of the printer driver that you are adding.
dim oPrinter
set oPrinter = CreateObject("Printer.Printer.1" )
oPrinter.PrinterName = "Test" ' name of the printer as it appears in the
Printers folder
oPrinter.DriverName = "HP LaserJet 2100" ' name that is referenced in
ntprint.inf
oPrinter.PortName = "IP_192.168.114.20" ' Specify a port name. Can also
point to LPT or COM port.
You are about to answer a thread that has been inactive for more than 6 months. If you still wish to proceed, please ensure that your posting is original and does not duplicate or overlap any prior responses to this thread.