Help with IP Printer install script.

Hello,

We’re getting 5 new xerox copiers/printers in the office next week, and I’m trying to create a script that will install them all as IP printers in one click. I need to setup 60 machines to access these, so it will be a life saver if I can get it to work. I’m having a couple of problems. First, the script get’s up to the point where it fills in the IP, but I can’t get it to click the “add” button as it’s greyed out. when manually entering the ip, if you hit tab it activates the button, but this doesn’t seem to be happening in the script. The second problem is how to get it to fill in the “Name” field with the correct name of the printer. Any help would be greatly appreciated!


activate application "Printer Setup Utility"

tell application "System Events"
	launch
	
	tell process "Printer Setup Utility"
		click menu item "Add Printer." of menu 1 of menu bar item "Printers" of menu bar 1
		
		tell window "Printer Browser"
			click button "IP Printer" of tool bar 1		
			set value of combo box 1 of group 1 of group 1 of group 2 of group 1 to "xxx.xxx.x.x"
			delay 2
			keystroke tab & tab & return
			click button "Add"
		end tell
		
	end tell
	
end tell
quit application "Printer Setup Utility"

no help yet, if anyone has any other ideas on how to install 5 printers via applescript or even a command line script, it would be greatly appreciated. I’m still having no luck getting past entering the printer ip. Thanks.

The problem is that the number of scripters who have a networked printer is probably small.

Not a script solution but can you not set up one machine and copy all the com.apple.print Preferences to each machine when installing the PPD’s.

Hey not sure if you have found a way around this yet…but just in case.

  1. install all the printers onto a test machine.
  2. take a look at this file in the system /etc/cups/printers.conf (need admin access to do so)
  3. you could copy this to a shared network volume, create an apple script that copies the ppds and this file to the local systems.
do shell script "sudo cp -f /Volumes/NETWORKVOLUMEFOLDER/printers.conf /Volumes/LOCALDISK/etc/cups/printers.conf &" with administrator privileges

give me a shout if you want further help.

or even maybe this do shell script

/usr/sbin/lpadmin -p PRINTERNAME -E -v lpd://PRINTERIPADDRESS -m PPDFILENAME -L “DESCRIPTION”