Installing network printers
I know it has been asked before, but I want to ask again. I'm trying to install network printers (that is on a printer server) by dept. So IT dept printers are ithp4200, ITricoh3400, IThp4700 from printerserver1. Can I do this in a distribution MI or Scripting. Can I see the screen shot and or code too.
Thanks
Answers (3)
I've used this vb script in the past. I would run it as an Online script as the current logged in user.
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 "\\printserver1\ithp4200" wshnet.AddWindowsPrinterConnection "\\printserver1\ithp4700" wshnet.SetDefaultPrinter "\\printserver1\ithp4200"
There are VB scripts that are built into windows that are VERY helpful for what you're wanting to do. I've included the template that we created for mapping printers through scripts. All you have to do is match up what goes where and you're good.
cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r ________A______ -h ___B_____ -o raw
cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\prndrvr.vbs -a -m "_________C_______" -h "______D________" -i "_______E_________"
cscript %WINDIR%\System32\Printing_Admin_Scripts\en-US\prnmngr.vbs -a -p _____F______ -m "____C______" -r _____A______
A= IP_IPAddress
B= IP Address
C= Driver Name
D= INF Path
E= Full INF Path
F= Name of Printer
C= Driver Name
A= IP_IPAddress