Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printers - The curse of IT 2

Status
Not open for further replies.

solo7

Technical User
Mar 14, 2001
243
NO
We have 250+ pc on our school site. We've upgraded to WinXP (service pack 2) and upgraded the printers to have integrated network cards. We have allocated each room to have it's own 'Organisational Group', and we are trying to script the printers to be installed on start up (log on). We've used the MS knowladge base article 314486 ( to help us but we keep running into security errors or the printer installs and the program using it doesn't recognise it's there.
Does anyone have any experience of installing printers automatically?

solo7 {thumbsup2]
 
Here is an example of a script I use at our school, it uses the first 3 characters of the computer name to work out which room it is in then adds the appropriate printer. I then attach it to the logon script area of the user OU's, it all happens in a blink of an eye at logon.

Code:
Set Network = CreateObject("Wscript.Network") 
compname = network.computername
room = left(compname,3)
   
Select Case room
      	Case "D29"
		Network.AddWindowsPrinterConnection "\\server1\D29Laser" 
		Network.SetDefaultPrinter "\\server1\D29Laser" 

	      Case "D28"
		Network.AddWindowsPrinterConnection "\\server1\D28Laser" 
		Network.SetDefaultPrinter "\\server1\D28Laser" 


case else
 
End Select

A requirement here is that your PC's have a location specific name, i've been using this system for over a year now and it works like a charm.

Hope this helps.
 
thanks bofhrevenge2
this should fit the bill nicley ...

solo7 [thumbsup2]
 
I am working on a novel network, I am testing out your script and i am getting and Error "The Print Processor is unknown" is this because i am on Novel?
 
When this script runs it connects to the Windows server downloads the appropriate drivers and installs them, this is a feature of Windows print services it's the same if you just browse to a shared printer and double click it.
I imagine that this process isn't possible with a Netware server using Windows clients (i could be wrong so if someone with Netware experience can jump in here then please do).
 
Solo7, we opted to install network printers as though they were local printers in order to get around all the problems with multiple users and network printers. Basically, to do that, all you have to do is: when you add the printer to the computer, tell it that it is a "Local printer attached to this computer". Uncheck the box that says to automatically detect the printer. On the next screen, choose to create a new port. Put the port in the following way: \\server\printer. Choose the approprate driver, then finish the install.

With this method, even though the printer is a network printer, it will act more like a local printer. Anyone who logs into the machine will be able to use it, you won't have to worry about adding printers via script, drivers, and user permissions. The only thing we set by script is which one is the default.

Hope this helps.
 
CX600 does this not require you to visit every station to install the printers?

That is exactly what the script does but it automates the task which is handy when you have 300+ clients.
 
bofhrevenge2, you're probably right. We started putting them in as local printers shortly after we rolled out our first batch of Windows 2000 workstations. We initially added them as normal network printers, but after a lot of calls and problems we came across the solution I posted. We went back and manually added them to the computers we had already rolled about (about 50). After that it just became a part of our disk image we use for setup.

If the original poster doesn't have too many multi-user workstations, maybe he could do the printers on the multiuser ones. We have about a 70/30 split of single/multiuser here.
 
I am testing how to add default printers via script and the simple one below works a treat. I now want to ask the script to check the OU a user is in, in AD and assign the correct printer...

How anyone know how to do this?
 
agiddens,

You can use ifmember.exe in your logn script (DL from Micro$oft) and assign printers using printui.dll based on group membership.

HTH

Marty
Network Admin
Hilliard Schools
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top