Printers in computer labs are disappearing. It is a mix of students deleting them and Print Center losing them.
Solution:
An AppleScript that runs at login. The AppleScript removes printers that are in the Print Center. Then it copies your backup ppd folder into the Print Center ppd folder. It then deletes the printer.conf file and replaces it with the labprinters.conf file.
Setup Information:
- Set up your default printers in Print Center
- Make a copy of your /etc/cups/ppd folder and call it labppd
- Make a copy of your printers.conf file and call it labprinters.conf
- Open Script Editor and Enter the following text:
Replace "root password" with your root password. Make sure you save your file as an Application.tell application "Terminal" do shell script "rm -r /etc/cups/ppd" password ¬ "root password" with administrator privileges do shell script "cp -r /etc/cups/labppds /etc/cups/ppd" password ¬ "root password" with administrator privileges do shell script "rm /etc/cups/printers.conf" password ¬ "root password" with administrator privileges do shell script ¬ "cp /etc/cups/labprinters.conf /etc/cups/printers.conf" password ¬ "root password" with administrator privileges do shell script "killall -9 cupsd" password ¬ "root password" with administrator privileges do shell script "cupsd" password ¬ "root password" with administrator privileges quit end tell - Go into System Preferences -> Login Items and select your application so it will launch at login.

