ButtaFingaz
11-08-2005, 09:08 AM
Hi there i have deployed a new print server on the network. before i decommision the old Print server i need to hook everyone up to the new print server. Some users use more than one printer i have managed to get hold of a script which adds two printers and selects the default. like so
Option Explicit
Dim oNetwork, sPrintPath
Set oNetwork=CreateObject("Wscript.Network")
sPrintPath="\\Printershare\printer"
oNetwork.AddWindowsPrinterConnection sPrintPath
'oNetwork.RemovePrinterConnection sPrintPath, true, true
oNetwork.SetDefaultPrinter sPrintPath
sPrintPath="\\Printershare\printer"
oNetwork.AddWindowsPrinterConnection sPrintPath
oNetwork=vbEmpty
sPrintPath=vbEmpty
Does anyone know how i can write a script using the existing script i have so it can delete the printers from the old print server and add the new printers on the new print server?
Option Explicit
Dim oNetwork, sPrintPath
Set oNetwork=CreateObject("Wscript.Network")
sPrintPath="\\Printershare\printer"
oNetwork.AddWindowsPrinterConnection sPrintPath
'oNetwork.RemovePrinterConnection sPrintPath, true, true
oNetwork.SetDefaultPrinter sPrintPath
sPrintPath="\\Printershare\printer"
oNetwork.AddWindowsPrinterConnection sPrintPath
oNetwork=vbEmpty
sPrintPath=vbEmpty
Does anyone know how i can write a script using the existing script i have so it can delete the printers from the old print server and add the new printers on the new print server?