Scripting Printer Installation with PrintUI.dll

  • Section(s): Miscellaneous
  • Created on Apr 04, 2006.
  • Last Modified on Apr 27, 2006.
  • Last Modified by Chris Sanders.
  • Rated 2.7 out of 5 based on 12 votes.
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.

Article not looking right or info is missing? Let us know so that we can fix it: .


Receive all the latest articles by email!

Receive Real-Time & Monthly WindowsNetworking.com article updates in your mailbox. Enter your email below!
Click for Real-Time sample & Monthly sample

Become a WindowsNetworking.com member!

Discuss your network issues with thousands of other network administrators. Click here to join!

Community Area

Log in | Register

Readers' Choice

Which is your preferred Anti Virus Appliance solution?