Managing Printers with PrintUI.DLL


Managing printers on client PC’s via the login script can be a useful way to ensure users have consistent printer configuration. This can be achieved by scripting calls to PRINTUI.DLL. These scripts will work on PC’s running Windows 2000, XP and Vista. The calls can be made from batch files, VB Scripts and PowerShell.

Delete a printer a network printer quietly:

rundll32.exe printui.dll,PrintUIEntry /q /dd /n\\server\printer

Add a printer a network printer quietly:

rundll32.exe printui.dll,PrintUIEntry /q /in /n\\server\printer

Set the default printer:

rundll32.exe printui.dll,PrintUIEntry /y /n “printer”

A full list of parameters for the PRINTUI.DLL can be obtained by running this command:

rundll32 printui.dll,PrintUIEntry /?

Advertisements