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!
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"
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:
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:
NET STOP SPOOLER
NET START SPOOLER
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.