Re: Setting a default printer.

From: Gary Lum <glum_at_ischool.berkeley.edu>
Date: Wed Oct 11 2006 - 15:43:38 PDT

We use a VBS login script attached to the student OU gpo to map printers
and to set the default printer on login.

Script.vbs
On error resume next

Dim WSHShell, WSHNetwork, objDomain, DomainString, UserString, UserObj,
Path, Message, Title

Set WSHShell = CreateObject("WScript.Shell")
Set WshNetwork = CreateObject("WScript.Network")

'Remove old netowrk drives
<snip>

'remove old printers
Set WSHPrinters = WSHNetwork.EnumPrinterConnections
For LOOP_COUNTER = 0 To WSHPrinters.Count - 1 Step 2

If Left(WSHPrinters.Item(LOOP_COUNTER +1),2) = "\\" Then
       WSHNetwork.RemovePrinterConnection WSHPrinters.Item(LOOP_COUNTER
+1),True,True
     End If

Next

'add new drives
<snip>

'Add printers
WshNetwork.AddWindowsPrinterConnection "\\newt.sims.berkeley.edu\room210"
WshNetwork.AddWindowsPrinterConnection "\\newt.sims.berkeley.edu\room5"
WshNetwork.SetDefaultPrinter "\\newt.sims.berkeley.edu\room210"

lucia greco wrote:
> Hi:
> Does any one out there know how to set a default printer for domain users.
> We have two virtual printers and a reel printer in the lab and students
> keep using the printer button not knowing witch printer it is using. I
> want to set the default printer to be the reel printer so I stop hearing
> that the printer is not printing.
> The two virtual printers have special uses and need to be available but
> not as often.
> Thanks Lucy
>
> Lucia Greco
> University of California Berkeley
> Assistive Technology Specialist
> (510) 643-7591
>
>
>
> ------------------------------------------------------------------------
> The following was automatically added to this message by the list server:
>
> For information about Micronet, including subscribing to
> or unsubscribing from its mailing list and finding out
> about upcoming meetings, please visit the Micronet Web site:
> <http://micronet.berkeley.edu/>.

------------------------------------------------------------------------
The following was automatically added to this message by the list server:

For information about Micronet, including subscribing to
or unsubscribing from its mailing list and finding out
about upcoming meetings, please visit the Micronet Web site:
<http://micronet.berkeley.edu/>.
Received on Wed Oct 11 15:46:09 2006

This archive was generated by hypermail 2.1.8 : Wed Oct 11 2006 - 15:46:10 PDT