Some times I need to install a printer driver silently, this could for example be in a SCCM Task Sequence.
One way around this is to use the build-in tools in C:WindowsSystem32Printing_Admin_Scripts
Lets try to install the HP Universal Printer Driver this way, by using the command:
cscript “C:WindowsSystem32Printing_Admin_Scriptsen-USprndrvr.vbs” -a -m “HP Universal Printing PCL 6 (v5.7.0)” -i “C:drvhpcu155u.inf”
After this the driver is installed as shown in the Print Server Properties.
See more information regarding prndrvr.vbs here http://technet.microsoft.com/en-us/library/cc754632.aspx
We can use another script, prnmngr.vbs to install a printer.
With this command we install a printer called temp pointing to LPT1 and using the driver we just installed:
cscript “C:WindowsSystem32Printing_Admin_Scriptsen-USprnmngr.vbs” -a -p “temp” -m “HP Universal Printing PCL 6 (v5.7.0)” -r “lpt1:”
The printer is installed as shown in Devices and Printers:
Se more information regarding prnmngr.vbs herehttp://technet.microsoft.com/en-us/library/cc725868.aspx
Installing the printer will also generate the “famous” BUD file that sometimes is cursing printing problems. As an example problems with the BUD file can lead to very slow printer dialog boxes.
The .BUD file is a binary printer description file that is used to increase spooler efficiency for printer drivers.
Now lets delete the printer again with the command:
cscript “C:WindowsSystem32Printing_Admin_Scriptsen-USprnmngr.vbs” -d -p “temp”
And finally we delete the Printer driver with the command:
cscript “C:WindowsSystem32Printing_Admin_Scriptsen-USprndrvr.vbs” -d -m “HP Universal Printing PCL 6 (v5.7.0)” -e “Windows x64” -v 3
This is just examples on how to use some of the printing tools, there are lots of possibilities and even more tools, so take a closer look at the tools when your need to automate printers.