Access Keys:
Skip to content (Access Key - 0)

SCCM - Printer Deployment

SCCM has no built-in mechanism to handle printer driver installation and printer object creation. We can do the installation of the printer drivers in a few different ways as well as use some built-in Windows vbs scripts to create the printer objects. We will deploy the printers as "Applications".

Example 1

The first example will show how to create an HP printer. HP has a Universal Print Driver that simplifies the process of creating printers. Creating a printer in SCCM can be done in same way you would create an application. Instead of using a "setup.exe" as install program, we'll use a script to "install" the printer.

  • First copy a folder containing the extracted HP Universal Printer Drive and install script to the UNC path where your packages sources are located. The driver can be downloaded at: http://www8.hp.com/us/en/solutions/business-solutions/printingsolutions/upd.html

    upd.cmd script
  •  The install script "upd.cmd" contains:

    @echo off

    title Printer Installation starting...
    echo.

    echo Installing 1st Floor Printer .....Please Wait..........
    "upd-ps-x64-5.9.0.18326\install.exe" /q /n"W91-104 HP Color LaserJet 4650" /sm18.94.0.251
    echo.

    echo Printer Installation Completed.........

  • The syntax for installing a printer using the Universal Printer Driver setup exe is as follows:

    "install.exe" /q /n /n"User Friendly Printer Name" /smIPaddressOfPrinter



  • The syntax for deleting the printer would be:

    PrintUI.exe /dl /n "User Friendly Printer Name" /q

  • Please see the note below for how to set the printer detection method.

Example 2

The second example demonstrates installing the inf printer driver using a vbscript that comes with Windows. The Printer Admin Scripts are located at %SystemRoot%\System32\Printing_Admin_Scripts\ on the system. You can copy the scripts to the source folder that already contains the printer drivers for ease of installation. These scripts are relatively small and this guarantees that the client machine will have the scripts.

  • The install.cmd script contains:

    @ECHO OFF

    REM Create Port
    cscript Prnport.vbs -a -r IP_W91-MFD-1.MIT.EDU -h W91-MFD-1.MIT.EDU -o raw -n 9100

    REM Install Driver
    cscript Prndrvr.vbs -a -m "Xerox WorkCentre 7835 PS" -i "%cd%\Drivers\x2DSPYP.inf"

    REM Create Printer
    cscript prnmngr.vbs -a -p "Printer W91-MFD-1" -m "Xerox WorkCentre 7835 PS" -r IP_W91-MFD-1.MIT.EDU 

    EXIT


  • How do we find out what model name to use in the following command? In this example we choose Xerox WorkCentre 7835 PS. You can typically find this directly in the inf file. Right click the inf file and choose to open it with a text editor.

    cscript Prndrvr.vbs -a -m "Xerox WorkCentre 7835 PS" -i "%cd%\Drivers\x2DSPYP.inf"

  • We're accomplished 3 major things with this script.
    1. Create a port.
    2. Install the printer driver.
    3. Create the printer.
  • Again, the syntax for deleting the printer would be:

    PrintUI.exe /dl /n "User Friendly Printer Name" /q

  • Please see the note below for how to set the printer detection method.

Printer Detection Registry Key

For both printer installation methods, you'll also need to create  detection method for the application to determine if the printer is already installed. You can do this by adding a registry key detection in the Detection Method tab of the Deployment Type. The key should follow the format of SYSTEM\CurrentControlSet\Control\Print\Printers\PrinterName.

Printer Registry Key

Additional Notes

For those using the printer deployment method in example 2, you'll need to take some additional steps if you are deploying printers to non-admin users. A few settings need to be added to the GPO in order to allow non-admins to install printer drivers, otherwise the printer install scripts will fail. All computers under the Endpoints OU already have this setting enabled.

  • In Group Policy Management Editor go to Computer Configuration > Policies > Administrative Templates > System > Driver Installation. Edit Allow non-administrators to install drivers for these device setup classes setting.
  • Enable policy setting and click Show… to specify device types that users will be able to install.
  • Add following device classes:
    4d36e979-e325-11ce-bfc1-08002be10318
    4658ee7e-f050-11d1-b6bd-00c04fa372a7 

Summary

You can create a printer in the same manner that you can create an application. As mentioned earlier use the install script as the install program and use PrintUI.exe for the uninstall program. To deploy your newly created printer, follow the documentation here: SCCM Create a Deployment

IS&T Contributions

Documentation and information provided by IS&T staff members


Last Modified:

September 21, 2017

Get Help

Request help
from the Help Desk
Report a security incident
to the Security Team
Labels:
sccm sccm Delete
endpoint endpoint Delete
management management Delete
printer printer Delete
deployment deployment Delete
printers printers Delete
c-sccm c-sccm Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
Feedback
This product/service is:
Easy to use
Average
Difficult to use

This article is:
Helpful
Inaccurate
Obsolete
Adaptavist Theme Builder (4.2.3) Powered by Atlassian Confluence 3.5.13, the Enterprise Wiki