We help IT Professionals succeed at work.

TCP/IP Printer install via VBScript

I have several printers I need to install throughout the network.  I would like to accomplish this through a vbscript.   The printers are TCP/IP.  How would I go about scripting the install of a TCP/IP printer on the network.

The printers do show up in Active Directory if that helps.
Watch Question

Top Expert 2005
You're running Server 2008, as long as the client is XP with the group ploicy preferences patch or Vista or newer, you can use Group Policy Preferences or Print Management Console to deploy your printers via Group Policy.It's the easiest method and ensures they  get done.
brwwigginsIT Manager

I agree the GPO preferences are easier, but if you insist on VBS then you could do something similar to below
Option Explicit
Dim mappedPrinter, printerpath
printerpath = "\\Server\PrinterName" 
Set mappedPrinter = CreateObject("WScript.Network") 
mappedPrinter.AddWindowsPrinterConnection printerpath

Open in new window


I did not know there was a preference patch for XP?  There is really?  We are using Server 2008 and Windows XP SP3 clients.  Do all the preferences apply to XP or just certain ones?
Top Expert 2005

This is the patch you need:


It might have already been deployed via Automatic Updates.  You can easily check this by looking for the KB number in the registry here: