I have a script that installs a TCP/IP printer port and shared printer.
The script works fine. (See Below)
However I need to install over 100 different printers to my print server.
All the printer speciffic information I need is in an Excell spread sheet,
(Port name, IP address, Driver name, Printer name, Share name, Location,
etc. ).
I want to run this script and have it create all my printer ports and
printer shares.
I know I will have to change the printer speciffic data in the script to
variables, but I am not sure how to have the script read the data form
either Excell or a .CSV file.
I assume I will then have to setup some kind of loop.
I am new to scripting and any help is appreciated.
Thanks
Chris Coates
ccoates@gfs.com
Dim oPort
Dim oMaster
Dim oPrinter
Set oMaster = CreateObject("PrintMaster.PrintMaster.1")
Set oPort = CreateObject("Port.Port.1")
Set oPrinter = CreateObject("Printer.Printer.1")
oPort.ServerName = ""
oPort.PortName = "IP_10.251.1.94"
oPort.PortType = 1
oPort.HostAddress = "10.251.1.94"
oPort.PortNumber = 9100
oPort.SNMP = false
oPort.SNMPDeviceIndex = 1
oPort.CommunityName = "public"
oPort.QueueName = ""
oPort.DoubleSpool = false
oMaster.PortAdd oPort
If Err <> 0 then
end If
oPrinter.ServerName = oPort.ServerName
oPrinter.PrinterName = "NET957"
oPrinter.Shared = True
oPrinter.ShareName = "NET957"
oPrinter.Location = "HR"
oPrinter.Comment = ""
oPrinter.EnableBidi = false
oPrinter.DriverName = "HP LaserJet 8000 Series PCL"
oPrinter.PortName = oPort.PortName
oPrinter.DriverPath = ""
oPrinter.InfFile = "c:\windows\inf\ntprint.inf"
oMaster.PrinterAdd oPrinter
oMaster.PrinterSet oPrinter
If Err <> 0 then
end If