Thursday, March 18, 2010

Deleting printers from the command line

There is an updated post on this topic available: Deleting local or network printers as well as printer drivers from the command line

To quickly and silently delete a printer using a command line, use the following command:

rundll32 printui.dll,PrintUIEntry /dl /n "NAME_OF_PRINTER" /q

This command will silently delete the printer and not issue any messages to the user (/q switch).

There is much more you can do with this command, just enter the following to see the list of supported options:

rundll32 printui.dll,PrintUIEntry /?