Remotely Install Printer Drivers

There are a few ways to remotely install printer drivers. This post will cover two methods, using a print server and setting up an IP port. Both of these methods are also covered in a tutorial done at a webcast. A recording of this webcast is available below. Let’s dive in!

Remotely Install Printer Drivers

Using Print Server

This method is the easiest and adds the printer for all users on the target machine. To add a printer using print server you’ll need run a couple commands. Using PDQ Deploy, create a new package and add two command steps.

The first command step will delete the printer if it does already exist. Doing this prevents errors that can occur from adding an already existing printer.

%WINDIR%\system32\Printui.exe /gd /q /n"\\TOKEN\Lexmark MS310dn North"

In the second command step, you’ll add the printer. The difference between these commands is the /gd (for global delete) is now a /ga (for global add).

%WINDIR%\system32\Printui.exe /ga /q /n"\\TOKEN\Lexmark MS310dn North"

Remotely Install Printer Drivers - using printer server
In both commands /q is critical for a silent deployment. Without that parameter your deployment will hang. You can see other parameters by entering the following into a command prompt:

printui /?

For your changes to take effect you may need to stop and start the print spooler. If after deploying the printer does not appear, add the following commands to your deployment:


IP Port

In this method, you will create a TCP/IP port and then install your printer.

First, spare yourself possible errors and clear out the printer and port. For this deployment package you’ll start off with a command step with the following command (of course, substitute your own printer name and IP address in your commands):

cscript %WINDIR%\system32\Printing_Admin_Scripts\en-US\prnmngr.vbs -d -p "Lexmark MS310"
cscript %WINDIR%\system32\Printing_Admin_Scripts\en-US\prnport.vbs -d -r "IP_10.0.0.246"

In the next command step, you’ll add the port. Again, substitute the appropriate IP address in quotes.

cscript %WINDIR%\system32\Printing_Admin_Scripts\en-US\prnport.vbs -a -r "IP_10.0.0.246" -h 10.0.0246


Your next two steps (one for each architecture type, 32-bit vs. 64-bit) will install your printer using an install step. You’ll want to get your install files from the printer vendor and research what parameters you may need to silently install your printer driver.

For our example, (which you can watch in the video below starting at 21:53) we got a batch file from the vendor which is listed in the install step as the install file. Then, the “Include Entire Directory” box is also checked. This is important if your installation does require multiple files.


3 responses

  • Just thought I’d say that there is a typo on the first two scripts above, where the printer address has a forward slash rather than a backward one…. only minor but to a tired it admin, meant a few mins headscratching when you blindly copy and plug in your values without changing that.

    %WINDIR%\system32\Printui.exe /gd /q /n”\\TOKEN/Lexmark MS310dn North”

    should be..

    %WINDIR%\system32\Printui.exe /gd /q /n”\\TOKEN\Lexmark MS310dn North”

  • This only seems to work if the drivers are installed before the line %WINDIR%\system32\Printui.exe /ga /q /n”\\NetworkPath\printername” is executed.

    If I take the /q out it will ask “Do you trust this printer” and then you can click OK to install the drivers.
    I have tried the /Gw option but that doesn’t seem to add the drivers either.
    %WINDIR%\system32\Printui.exe /ga /Gw /n”\\NetworkPath\printername”.

    Using the IP Port method, I don’t need because the printers are a network share and have a port dedicated on the server it is being shared from. Any advice about how to deploy the printer drivers before the global add (/ga).


Your email address will not be published.

Your Name

This site uses Akismet to reduce spam. Learn how your comment data is processed.