can any one please help?
batch file to add printers to windows 2000 server
Started by
thebucs
, Jun 02 2006 07:51 AM
#1
Posted 02 June 2006 - 07:51 AM
can any one please help?
#2
Posted 02 June 2006 - 08:26 AM
OK, I think this will work
You need to do two things--first, create a port, second install the printer
You might want to test this with 3 printers to ensure it works before creating the whole batch file. Let's say that you have a Zebra 170PABB (made up number) with an ip address of 192.168.0.15
You need two things--first, a network port to print to and thene the actual printer. First, discover what the output protocol for your printer is--most likely RAW (but could be LPR)
Use the first line of the batch file to create the port, the second to load the printer
prnport -a -r IP_192.168.0.15 -h 192.168.0.15 -o raw
prnmgr -a -p "ZebraRm101" -m "Zebra 170PABB" -r IP_192.168.0.15
for prnpoprt
-a means ADD
-r means port name or ROUTE TO THIS PORT
-h means the ip address
-o sets the output protocol
NOTE-- IT IS A BEST PRACTICE TO NAME THE PORT NAME AND IP ADDRESS THE SAME THING--not required, but smart
for prnmgr
-a means ADD
-p means what you want the printer to display as (in my example, I used shortand to say this printer is in Room 101)
-m means the printer model--THIS MUST BE EXACT SO WINDOWS KNOWS WHAT DRIVER TO USE
-r means port name or ROUTE TO THIS PORT
I would probably add all the ports first in a batch file and then the printers, just so you are not switching back and forth between commands...will go smoother
So, your batch file woudl look something like this
prnport -a -r IP_192.168.0.15 -h 192.168.0.15 -o raw
prnport -a -r IP_192.168.0.16 -h 192.168.0.16 -o raw
prnport -a -r IP_192.168.0.17 -h 192.168.0.17 -o raw
prnport -a -r IP_192.168.0.18 -h 192.168.0.18 -o raw
...
prnmgr -a -p "ZebraRm101" -m "Zebra 170PABB" -r IP_192.168.0.15
prnmgr -a -p "ZebraRm102" -m "Zebra 170PABB" -r IP_192.168.0.16
prnmgr -a -p "ZebraRm103" -m "Zebra 170PABB" -r IP_192.168.0.17
prnmgr -a -p "ZebraRm104" -m "Zebra 170PABB" -r IP_192.168.0.18
...
This all assumes that the drivers for these printers are already included on the system
You need to do two things--first, create a port, second install the printer
You might want to test this with 3 printers to ensure it works before creating the whole batch file. Let's say that you have a Zebra 170PABB (made up number) with an ip address of 192.168.0.15
You need two things--first, a network port to print to and thene the actual printer. First, discover what the output protocol for your printer is--most likely RAW (but could be LPR)
Use the first line of the batch file to create the port, the second to load the printer
prnport -a -r IP_192.168.0.15 -h 192.168.0.15 -o raw
prnmgr -a -p "ZebraRm101" -m "Zebra 170PABB" -r IP_192.168.0.15
for prnpoprt
-a means ADD
-r means port name or ROUTE TO THIS PORT
-h means the ip address
-o sets the output protocol
NOTE-- IT IS A BEST PRACTICE TO NAME THE PORT NAME AND IP ADDRESS THE SAME THING--not required, but smart
for prnmgr
-a means ADD
-p means what you want the printer to display as (in my example, I used shortand to say this printer is in Room 101)
-m means the printer model--THIS MUST BE EXACT SO WINDOWS KNOWS WHAT DRIVER TO USE
-r means port name or ROUTE TO THIS PORT
I would probably add all the ports first in a batch file and then the printers, just so you are not switching back and forth between commands...will go smoother
So, your batch file woudl look something like this
prnport -a -r IP_192.168.0.15 -h 192.168.0.15 -o raw
prnport -a -r IP_192.168.0.16 -h 192.168.0.16 -o raw
prnport -a -r IP_192.168.0.17 -h 192.168.0.17 -o raw
prnport -a -r IP_192.168.0.18 -h 192.168.0.18 -o raw
...
prnmgr -a -p "ZebraRm101" -m "Zebra 170PABB" -r IP_192.168.0.15
prnmgr -a -p "ZebraRm102" -m "Zebra 170PABB" -r IP_192.168.0.16
prnmgr -a -p "ZebraRm103" -m "Zebra 170PABB" -r IP_192.168.0.17
prnmgr -a -p "ZebraRm104" -m "Zebra 170PABB" -r IP_192.168.0.18
...
This all assumes that the drivers for these printers are already included on the system
#3
Posted 02 June 2006 - 09:52 AM
ok i tried, and it did not seem to work, maybe i did something wrong.
here is what i am trying to add
port name = E211
ip = 10.0.6.211
printer name E211
driver type = HP LaserJet 4
output = Raw
here is what i tried
prnport -a -r E211 -h 10.0.6.211 -o raw
and
prnmgr -a -p E211 -m HP LaserJet 4 -r E211
these are 2 seperate batch files
did i write this corectly or did i miss something?
here is what i am trying to add
port name = E211
ip = 10.0.6.211
printer name E211
driver type = HP LaserJet 4
output = Raw
here is what i tried
prnport -a -r E211 -h 10.0.6.211 -o raw
and
prnmgr -a -p E211 -m HP LaserJet 4 -r E211
these are 2 seperate batch files
did i write this corectly or did i miss something?
#4
Posted 02 June 2006 - 10:44 AM
put the printer and driver in " marks
prnmgr -a -p "E211" -m "HP LaserJet 4" -r E211
prnmgr -a -p "E211" -m "HP LaserJet 4" -r E211
#5
Posted 02 June 2006 - 11:05 AM
ok i tried that one as well. but still they do not display in pinters. here is what i have
prnport -a -r E211 -h 10.0.6.211 -o raw
prnmgr -a -p "E211" -m "HP LaserJet" 4 -r E211
what do you think?
prnport -a -r E211 -h 10.0.6.211 -o raw
prnmgr -a -p "E211" -m "HP LaserJet" 4 -r E211
what do you think?
#6
Posted 02 June 2006 - 12:46 PM
did you do it only as a batch? try typing them from a command line and relay any errors
#7
Posted 02 June 2006 - 01:20 PM
it says prnport is not recognized as an internal or external comand, operable program or batch file.
same for prnmgr
same for prnmgr
#8
Posted 02 June 2006 - 01:53 PM
http://download.micr...IUsersGuide.doc
http://www.windowsit...4539/14539.html
don't know if either of those two will help...i can't personally translate most of it...but gerry you may have an idea on it
http://www.windowsit...4539/14539.html
don't know if either of those two will help...i can't personally translate most of it...but gerry you may have an idea on it
#9
Posted 02 June 2006 - 01:54 PM
what operating system on the clients?
#10
Posted 02 June 2006 - 02:13 PM
windows 2000 server the clients are using an in house database system to take advantage of these printers.
#11
Posted 02 June 2006 - 02:46 PM
OK, we better back up here...explain how this network is set up again?
You've got 16 or so servers, and you want to print to them from...the servers? Or the clients?
The printers are network devices? Or they are hooked up to the servers directly?
You've got 16 or so servers, and you want to print to them from...the servers? Or the clients?
The printers are network devices? Or they are hooked up to the servers directly?
#12
Posted 02 June 2006 - 03:07 PM
ok there are 16 servers. they travel around the country ot ocnventions. with these servers are laptops a few hundred of them that also travel. on these servers the printers are set up as local printer using tcp/ip, however the jet directs that are plugged into these printers are plugged into switches. when all the equipment arrives at the convention, it is set up like any other network. the laptops use a database program that you tell it in the program which printers it will be able to print to. the printer itself is plugged into a switch. the printers are installed on the server that is at the convention. it is installed by doing the following..
add printer wizard,
next,
local printer,
next,
create a new port,
select tcp/ip as port type
when add standard tcp/ip port wizard comes up click next,
enter the ip (10.0.6.211)
enter port name (E211)
click next,
when additional port info comes up, click next,
click finish,
when the addd printer wizard comes back,
select hp from the left, and hplaserjet4 from the right,
click next,
keep existing driver,
next,
printer name (E211)
no to default
next
do not share
next
no to test page,
next,
finish
once this is done, you will see it in printers, and the database program can locate and send the info being printed to the correct jet direct and printer.
i hope this clarifies. i will be offline for a bit will return sat 3-june-06 at 0700 eastern time
thanks,
brian
add printer wizard,
next,
local printer,
next,
create a new port,
select tcp/ip as port type
when add standard tcp/ip port wizard comes up click next,
enter the ip (10.0.6.211)
enter port name (E211)
click next,
when additional port info comes up, click next,
click finish,
when the addd printer wizard comes back,
select hp from the left, and hplaserjet4 from the right,
click next,
keep existing driver,
next,
printer name (E211)
no to default
next
do not share
next
no to test page,
next,
finish
once this is done, you will see it in printers, and the database program can locate and send the info being printed to the correct jet direct and printer.
i hope this clarifies. i will be offline for a bit will return sat 3-june-06 at 0700 eastern time
thanks,
brian
#13
Posted 02 June 2006 - 03:11 PM
and these printer installation steps are run on the server or laptops?
I am trying to discern what is actually doing the printing?
I am trying to discern what is actually doing the printing?
#14
Posted 03 June 2006 - 05:32 AM
installed on the servers. the printing is done from the laptops through a database program. when you configure the laptops, you tell the database the printer name to be used (E211) then throughout the day when you print a record, it contacts the server and then prints the info to the printer. none of the print drivers are installed locally on the laptops, only servers.
#15
Posted 03 June 2006 - 05:41 AM
Oh....hmmm, so the laptops have some kind of automatic redirect to a printer server.....
this part:
prnport is not recognized as an internal or external comand, operable program or batch file.
same for prnmgr
I need to think about this
Do a search for prnport.vbs in c:\windows\system32
Is it there? Should be...what are the path statements in the server environment?
Open a command prompt, type
cscript
<enter>
what happens?
this part:
prnport is not recognized as an internal or external comand, operable program or batch file.
same for prnmgr
I need to think about this
Do a search for prnport.vbs in c:\windows\system32
Is it there? Should be...what are the path statements in the server environment?
Open a command prompt, type
cscript
<enter>
what happens?
Similar Topics
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users