An Engineers Notebook

Add a printer from command line

Here is a handy batch file usful for scripting.

@Echo Off
REM Add printer
rundll32 printui.dll,PrintUIEntry /in /n \Domain.localPrinterName
REM Set printer as default
rundll32 printui.dll,PrintUIEntry /y /n \Domain.localPrinterName
exit

Leave a Reply

Your email address will not be published.