Use the script below as part of a group policy user login script. It will delete all local printers and apply the network printers specified. Known to work on Windows XP, Windows Vista and Windows 7.
Change the names of the printers (for example \\server\printer01 )) to those on your network server.
This script is a VB Script and can be called from a batch file using using cscript - i.e. cscript RemoveNetPrinters.vbs
'==========================================================================
'
' NAME: RemoveNetPrinters.vbs
' COMMENT: Removes and add all net printers (XP Only)
'
'==========================================================================
ON ERROR RESUME NEXT
Set wshNet = CreateObject("WScript.Network")
Set wshPrn = wshNet.EnumPrinterConnections
For x = 0 To wshPrn.Count - 1 Step 2
If Left(wshPrn.Item(x+1),2) = "\\" Then wshNet.RemovePrinterConnection wshPrn.Item(x+1),True,True
Next
wshnet.AddWindowsPrinterConnection "\\server\printer01"
wshnet.AddWindowsPrinterConnection "\\server\printer02"
wshnet.SetDefaultPrinter "\\server\printer01"
'==========================================================================
Applies to: