Install Printer driver

Install Printer driver

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”

image

After this the driver is installed as shown in the Print Server Properties.

image

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:”

image

The printer is installed as shown in Devices and Printers:

image

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”

image

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

image

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.

image

+ posts

Table of Contents

Share this post
Search blog posts
Search
Authors
Modern Workplace consultant and a Microsoft MVP in Enterprise Mobility.

Modern Workplace consultant and a Microsoft MVP in Windows and Devices.

Infrastructure architect with focus on Modern Workplace and Microsoft 365 security.

Cloud & security specialist with focus on Microsoft backend products and cloud technologies.

Cloud & security specialist with focus on Microsoft 365.

Cloud & Security Specialist, with a passion for all things Cybersecurity

Cloud and infrastructure security specialist with background in networking.

Infrastructure architect with focus on design, implementation, migration and consolidation.

Infrastructure consultant with focus on cloud solutions in Office365 and Azure.

Modern workplace and infrastructure architect with a focus on Microsoft 365 and security.

follow us in feedly
Categories

Follow on SoMe