6 Replies Latest reply on Jun 5, 2009 10:10 AM by esmoore

    Automated installation and configuration of printers

    esmoore Rookie

      We are preparing for the replacement of several computers which connect to a total of twelve different printers.  The drivers and TCP/IP port information were not included in the sysprep image, so now that the computers have been imaged, we are faced with a dilemma.  We would are looking for a means of automating the installation and configuration of the printers on the new computers.  Anything that can be done to minimize hands-on work would be helpful.  Does anyone know of a utility that can automate the following:  install the necessary drivers, create the TCP/IP port, and create the actual printer object in the printers folder?

       

      Eric Moore

      High Plains Library District

        • 1. Re: Automated installation and configuration of printers
          zman Master

          There are many options depending on your infrastructure. Are you an AD shops. I have an old script that works off an INI ifle that deletes and installs printers in ad on the client.  Lot of people use printui.dll

          1 of 1 people found this helpful
          • 2. Re: Automated installation and configuration of printers
            Rookie

            My company just replaced all of their printers and I have a script that I am using to install our 30+ printers on each computer manually.  How would I push this onto our windows machines through LANDesk?  I have a different script for XP, Vista, and OSX.

             

            Thanks

            Erik

            • 3. Re: Automated installation and configuration of printers
              esmoore Rookie

              Thank you, Zman. After a little research, I learned how to streamline the process with printui.  For anyone who is monitoring this thread, here is the basic template I created for installing the PCL 6 drivers for the HP LaserJet P3005:

               

              -----------------------------

              hpljp3005pcl.bat

              -----------------------------

              set printername=%2
              set drivername="HP LaserJet P3005 PCL 6"
              set address=%1

              set infpath=.\hpljp3005\pcl6\hpc30xxc.inf

              cscript %systemroot%\system32\prnport.vbs -a -h %address% -r IP_%address% -o raw -n 9100

              rundll32 printui.dll,PrintUIEntry /if /b %printername% /f %infpath% /r IP_%address% /m %drivername%

               

               

              Since we have multiple P3005's at our libraries, I parameterized the IP address and printer connection name.  I can then create another batch file to feed the parameters to hpljp3005pcl.bat:

               

              call hpljp3005pcl.bat 192.168.121.37 "Reference Workroom"

               

               

              So far, I have been able to use batch scripts to install six LaserJet printers and three Xerox WorkCentre machines.  They should come in handy for pushing out printer drivers or even creating links in LaunchPad so users can install them on demand.

              • 4. Re: Automated installation and configuration of printers
                Rookie

                I have used your script and it works like a charm.  The only snag that I ran into was trying to automate adding it as a default for the user with the /y switch.  I changed the script around so that it is for a specific printer, but it shouldn't stop me from adding the printer as default.  Perhaps I need a batch to call the printer install and then to set is as default when it is finished.  I'll give that a shot and report back. 

                • 5. Re: Automated installation and configuration of printers
                  Rookie

                  Pretty much got it.  Wrapped it as an exe and created a scheduled task for it as well.  Only problem is I didn't have it return a code to LANdesk to say that the file was succesfully run.  Aside from that everything is a success.  If you want to set the printer as default after installation you need to add the following line in bold. For our purposes, we also needed to notify the user's when the installation was completed so we added the message box at the last line.  So other than notifying LANDesk that it was successfully run, it works as desired.

                  -----------------------------

                  PrinterName.bat

                  -----------------------------

                  set printername="Printer Name"

                  set drivername="Driver Name"

                  set address=IP Address

                  set infpath="Path to INF"

                  cscript %systemroot%\system32\prnport.vbs -a -h %address% -r IP_%address% -o raw -n 9100

                  rundll32 printui.dll,PrintUIEntry /if /b %printername% /f %infpath% /r IP_%address% /m %drivername%

                  rundll32 printui.dll,PrintUIEntry /y /n %printername%

                  msg * Printer Installation Completed.

                  • 6. Re: Automated installation and configuration of printers
                    esmoore Rookie

                    Thank you for the pointer on how to set the default printer.