3 Replies Latest reply on Feb 8, 2011 8:01 AM by PatGmac

    pissibility to install ip printer

    Apprentice

      Hi all,

       

      do anybody know any possibility to install some ip printers with LDMS?

       

      Hope you can help me guys.

       

      thanks in advance

        • 1. Re: pissibility to install ip printer
          Apprentice

          You need to write a script to configure them, then you can deploy that with LANDesk. Here is an example package/script: https://github.com/huronschools/luggage/blob/master/examples/hhs_printers/Printserver%20Managed/G5_Lab_BW%20Snow%20Leopard/postflight

          • 2. Re: pissibility to install ip printer
            Apprentice

            Hi Patrick,

             

            you mean just go to "Manage Scripts" and create "New Custom Script"

             

            delet all the stuff inside and paste this:

            if [ "$3" != "/" ]; then
            exit 0

            fi

             

            # Variables. Edit these.
            printername="psm_HHS_G5_BW"
            location="HHS Room 099"
            gui_display_name="HHS G5 Lab Black and White Printer"
            address="lpd://10.110.1.11/print -P"

            driver_ppd="/Library/Printers/PPDs/Contents/Resources/de.lproj/hp LaserJet 4200 Series.gz"

             

            ### Printer Install ###
            # Install the printer.
            /usr/sbin/lpadmin -p "$printername" -L "$location" -D "$gui_display_name" -v "$address" -P "$driver_ppd" -E -o printer-is-shared=false

             

             

            exit 0

             

            PS. The Driver is allready installed

             

            unfortunatly the task fails

             

            i have tryied this as well:

            [MACHINES_MAC]
            REMEXEC01=lpadmin -p Test "Test " -E -v lpd://10.110.1.1/print -P "/Library/Printers/PPDs/Contents/Resources/de.lproj/Canon CLC-iR C3220-C1 PS Ver2.1" -o printer-is-shared=false
            REMEXEC02=lpadmin -p HAM-32185-CLC -o EFSortStapleOpt=FinisherStapler2
            REMEXEC03=lpadmin -p HAM-32185-CLC -o EFPaperDeckOption=CassFeeding

            unfortunately nothing happens on the client

             

            any idea why?

            • 3. Re: pissibility to install ip printer
              Apprentice

              First of all, make sure the script works on a client before you try to deploy it with landesk. Get all the variables correct for your enviornment. This script was a postflight for a package installer but you should be able to deploy standalone. (NOTE: this is not my script, but a guy I know on twitter)

               

              You should get rid of the first three lines which is checking to make sure it's only being used on the boot volume, but only applies to package installers since that is where $3 is set. The address variable you have set with "print -P", the address is supposed to be "address/queue name". Verify you have the PPD path correct for the OS you're deploying to. 10.4 and 10.5/10.6 store PPD's in different places.

               

              I've never deployed anything with the "managed scripts" tool in landesk, never liked the whole "remexec" requirement. I would just deploy it as a software package. Name the script with a .sh extension and the first line should have the "shebang": #!/bin/sh

               

              So it should look something like:

               

               

              #/bin/sh
              
              printername="homermg_hp_4200"
              location="Homermg's Office"
              gui_display_name="Homermg HP Laserjet 4200"
              address="lpd://10.110.1.11/" # If you're going direct to a printer, you can format this way
              #address="lpd://10.110.1.11/homermg_hp_4200" # If you are using print server, specify queue this way
              driver_ppd="/Library/Printers/PPDs/Contents/Resources/de.lproj/hp LaserJet 4200 Series.gz"
              
              ### Printer Install ###
              # Install the printer.
              /usr/sbin/lpadmin  -p "$printername" -L "$location" -D "$gui_display_name" -v "$address"  -P "$driver_ppd" -E -o printer-is-shared=false
              
              exit 0
              

               

              The program doing the work here is "lpadmin", so if you get caught up, check the man page for lpadmin.

               

              You can confirm what some of the variables should look like by looking at your printer options in System Preferences for a printer you added manually.