Automating Printer Installation in Windows using Universal Printing Drivers

By Parthiban Ponnusamy


Tired of installing printers in every laptop manually? Then, you need to read this article. Here, I am going to explain, How to automate installing printers in windows desktops and laptops. To achieve this, we are going to create an unattended executable, which installs the printer automatically, when user clicks on it. I am assuming that you have HP network printers.


Required: 


     1. HP Universal Print driver (UPD)
     2. WinRAR


About HP Universal Print Drivers:


The HP Universal Print Driver is a single, intelligent print driver that gives users instant access to a wide range of HP print devices, replacing individual product drivers. The HP Universal Print Driver makes it easy to connect to HP printing devices without having to download separate, product-specific drivers. And a more streamlined imaging and printing environment means less strain on the network and easier installation of new printers and queues.


Advantages of HP UPD:
1. Easier to manage and deploy
2. Provides real time printer status to users which increases the productivity
3. Easier to create and manage print policies in corporate environment


How to Automate Printers Installation:
  • Download Universal Printing Drivers (UPD)
  • Extract the ZIP file to a folder named HPUPDPS
  • Create a batch script named “upd.cmd” with the following content and place this file in the extracted folder

@echo off

title Printer Installation starting...
echo.

echo Installing 7th Floor Printer .....Please Wait..........
"%programfiles%\HPUPDPS\install.exe" /q /n"7th_Floor_HP2015" /sm192.168.1.49
echo.

echo Installing 6th Floor Printers .....Please Wait.........
"%programfiles%\HPUPDPS\install.exe" /q /n"6th_Floor_HP9040" /sm192.168.1.50
"%programfiles%\HPUPDPS\install.exe" /q /n"6th_Floor_HPMFP" /sm192.168.1.51
echo.

echo Installing 8th Floor Printers .....Please Wait.........
"%programfiles%\HPUPDPS\install.exe" /q /n"8th_Floor_HP4650" /sm192.168.1.55
"%programfiles%\HPUPDPS\install.exe" /q /n"8th_Floor_HPMFP" /sm192.168.1.52
"%programfiles%\HPUPDPS\install.exe" /q /n"8th_Floor_HP9040" /sm192.168.1.53
echo.

echo Installing 5th Floor Printer .....Please Wait.........
"%programfiles%\HPUPDPS\install.exe" /q /n"5th_Floor_HP9040" /sm192.168.1.54

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


In the script,
%programfiles%\HPUPDPS - Location of the UPD files
Install.exe - the installer for UPD
/q – silent install switch
/n – To specify the printer name
/sm – To specify the IP address of the printer


Now, we are going to use WinRAR tool to create a self extracted installer. To do this,

  • Right click on HPUPDPS folder and select “add to archive”
  • Select “Create SFX Archive” in WinRAR window
  • Click “Advanced SFX options”
  • In path to extract textbox Type, “%programfiles%”
  • In Run after Extraction textbox Type, “%programfiles%\HPUPDPS\upd.cmd"
  • Click “Modes” and select “Hide Start dialogue” and “Overwrite all files” options
  • Click “Text and Icon” and choose the Title and icon which you want to use
  • Click Ok for all windows. Now it will create the Self extracted compressed file.


Thats all. you are done..! 


Now this file is an executable file and once the user double click on the installer, it will silently extracts the contents to “Program files” directory and start the script named “upd.cmd”. Now you can publish this executable file to users through intranet or shared drives. with this installer, users can install the printers without system admins help. Since universal printing drivers are common and supports for almost all HP printer models, you don't need to worry about different drivers for different printer models.


With little enhancements, you can use this in your login scripts in active directory environment to ensure that every laptop/desktop installed and configured with printers.


Automate and become lazy..!