Scripting Printer Installation with PrintUI.dll

by Chris Sanders [Published on 27 April 2006 / Last Updated on 27 April 2006]

Printer installation can be made into a scripting process very easily by use of the PrintUI DLL. Here is how to do it.

In certain network situations it can be very beneficial to script the installation of printers based on physical location, username, group membership, etc. One of the most used methods of doing this is through PrintUI.dll.

The following command will install a printer named “LabA’ that is shared off of a printer server called “FacilityA”:

rundll32 printui.dll,PrintUIEntry /ga /n\\FacilityA\LabA /y

PrintUI.dll has several switches that can do almost any type of printer manipulation you could possible image. To view all of these switches you can type:
rundll32 printui.dll,PrintUIEntry /?

***

Chris Sanders is the network administrator for one of the largest public school systems in the state of Kentucky. Chris's specialties include general network administration, windows server 2003, wireless networking, and security. You can view Chris' personal website at www.chrissanders.org.

The Author — Chris Sanders

Chris Sanders is a network security analyst for EWA Government Systems Inc. Chris is the author of the book Practical Packet Analysis as well as several technical articles. His personal website at www.chrissanders.org contains a great deal of information, articles, and guides related to network administration, network security, packet analysis, and general information technology.

Latest Contributions

Featured Links