Printing queries and woes

G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

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
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.group_policy (More info?)

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

On Wed, 5 May 2004 00:17:55 +0100, "Jim Florence" <florence_james@hotmail.com>
wrote:

>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