Printing queries and woes

  • Thread starter Thread starter Jim Florence
  • Start date Start date
J

Jim Florence

Hello,

We have an active directory setup to allocate our printers via login scripts
based on a machines first 3 characters.

We had a lot of trouble getting this to work initially but after much
tinkering we managed to get a solution, and now the problems.........

To get it to work we had to create an MSI package containing all our printer
drivers and allocate the package to all our PC's and then put a wait of 15
seconds between adding multiple printers or we get drop outs and printers
don't connect.

My questions are is there a more elegant way of rolling out the printer
drivers and is anyone else having to add a wait in their logon script to
allow printers to be added.

Here is a fragment of the script

if department = "ADM" then
printer1 = "\\rgc-1\adm-office"
printer2 = "\\rgc-1\adm-phoenix"
printer3 = "\\rgc-1\adm-cash"
printer4 = "\\rgc-1\adm-dev"
printer5 = "\\rgc-1\smt-head"
printer6 = "\\rgc-1\adm-jhs"
printer7 = "\\rgc-1\adm-staffww"
printer8 = "\\rgc-1\geo-base"

Select Case department_location
case "BLK" defprinter=printer8
case "OFF" defprinter=printer1
case "PHO" defprinter=printer2
case "CSH" defprinter=printer3
case "DEV" defprinter=printer4
case "HMS" defprinter=printer5
case "JHS" defprinter=printer6
case "JHO" defprinter=printer6
case "CAR" defprinter=printer7
case "SRW" defprinter=printer7
case "MED" defprinter=printer2
End Select

if department_location = "HMS" then
WSHNetwork.AddWindowsPrinterConnection "\\rgc-1\jun-colour"
end if

WSHNetwork.AddWindowsPrinterConnection printer2
WScript.Sleep(15000)
WSHNetwork.AddWindowsPrinterConnection defprinter
WScript.Sleep(15000)
WSHNetwork.SetDefaultPrinter defprinter
WScript.Sleep(15000)

END IF

Any pointers gratefully recieved

Regards

Jim
 
See tip 2014 in the 'Tips & Tricks' at http://www.jsiinc.com

Hello,

We have an active directory setup to allocate our printers via login scripts
based on a machines first 3 characters.

We had a lot of trouble getting this to work initially but after much
tinkering we managed to get a solution, and now the problems.........

To get it to work we had to create an MSI package containing all our printer
drivers and allocate the package to all our PC's and then put a wait of 15
seconds between adding multiple printers or we get drop outs and printers
don't connect.

My questions are is there a more elegant way of rolling out the printer
drivers and is anyone else having to add a wait in their logon script to
allow printers to be added.

Here is a fragment of the script

if department = "ADM" then
printer1 = "\\rgc-1\adm-office"
printer2 = "\\rgc-1\adm-phoenix"
printer3 = "\\rgc-1\adm-cash"
printer4 = "\\rgc-1\adm-dev"
printer5 = "\\rgc-1\smt-head"
printer6 = "\\rgc-1\adm-jhs"
printer7 = "\\rgc-1\adm-staffww"
printer8 = "\\rgc-1\geo-base"

Select Case department_location
case "BLK" defprinter=printer8
case "OFF" defprinter=printer1
case "PHO" defprinter=printer2
case "CSH" defprinter=printer3
case "DEV" defprinter=printer4
case "HMS" defprinter=printer5
case "JHS" defprinter=printer6
case "JHO" defprinter=printer6
case "CAR" defprinter=printer7
case "SRW" defprinter=printer7
case "MED" defprinter=printer2
End Select

if department_location = "HMS" then
WSHNetwork.AddWindowsPrinterConnection "\\rgc-1\jun-colour"
end if

WSHNetwork.AddWindowsPrinterConnection printer2
WScript.Sleep(15000)
WSHNetwork.AddWindowsPrinterConnection defprinter
WScript.Sleep(15000)
WSHNetwork.SetDefaultPrinter defprinter
WScript.Sleep(15000)

END IF

Any pointers gratefully recieved

Regards

Jim


Jerold Schulman
Windows: General MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top