Home > Casper, Mac administration, Mac OS X, Scripting > Deploying Xerox print drivers on a per-OS basis via Casper’s Self Service

Deploying Xerox print drivers on a per-OS basis via Casper’s Self Service

In my shop, we use a Xerox color copier/printer along with a number of Canon ImageRunner printers. Like the Canons, I have the Xerox printer available in Casper’s Self Service so that our users can set this printer up themselves on their Macs. When I recently overhauled my Canon printer setups, I decided to also revisit how Self Service handled setting up the Xerox printer. Unlike our Canon printers, our Xerox printer used LPR already so I figured that getting the right drivers deployed should be straightforward.

Then I looked at Xerox’s driver page and saw three different driver installers available:

For 10.5.x – Xerox Print Driver 2.94.3

For 10.6.x – Xerox Print Driver 2.112.0

For 10.7.x through 10.9.x – Xerox Print Driver 2.113.0

I wanted to maintain roughly the same workflow as I had with the Canon printers, but I also wanted to make sure that the OS-appropriate driver was delivered to each Mac.

For details on how I addressed this, see below the jump.

Here’s the workflow I wanted to use when the Xerox printer setup is requested via Self Service:

A. Casper will check the Mac to see if the needed Xerox drivers are installed.
B. If no Xerox drivers or older Xerox drivers are detected, the appropriate Xerox print drivers will be installed before the requested printer is set up.
C. If the installed drivers are the same version or higher as the print drivers available via Self Service, no drivers are installed and Casper will proceed to set up the printer using the installed drivers.

The first part was figuring out if the needed Xerox drivers were installed. Like the Canon drivers, Xerox’s installer packages didn’t have an easy way I could see to discern the driver version from the installer receipts, so I looked for something else that would have the version number.

After some digging, I was able to confirm that the XeroxFeatures.plugin located in /Library/Printers/Xerox/PDEs had the version number that I was looking for.

Screen Shot 2014-02-10 at 3.48.30 PM

I also confirmed that I could use the defaults command to pull the version information from the CFBundleShortVersionString key value stored in /Library/Printers/Xerox/PDEs/XeroxFeatures.plugin/Contents/Info.plist.

From there, I built the following script:

The script checks /Library/Printers/Xerox/PDEs/XeroxFeatures.plugin/Contents/Info.plist for the CFBundleShortVersionString key value.

Based on the key value, the following actions are taken:

– If the value returned is less than the version of the current drivers, the Xerox print drivers are installed by a Casper policy before the requested printer is set up.
– If the installed drivers are the same version or higher as the print drivers available on the Casper server, this information is logged and the Xerox print drivers are not installed.

The driver version that the script is looking for is then set on the JSS by using parameters five, six or seven in the JSS settings for the script. As of 2-10-2014, the current versions are as follows:

10.5.x: 2.94.3
10.6.x: 2.112.0
10.7.x – 10.9.x: 2.113.0

Screen Shot 2014-02-10 at 1.48.44 PM

The script uses a manual trigger to run a Casper policy that would install the print drivers. The next part was to building policies which used that trigger, one for each driver installer.

Building the individual policy was straightforward, as I just needed it to respond to the manual trigger and install the package specified by the policy. When new Xerox drivers come out, all I should need to do is update the policy with the new installer package.

For 10.5.x Macs:

I built a policy that was triggered by the manual trigger and had the Xerox Print Driver 2.94.3 installer as the package to be installed. I then scoped the policy to a smart group that only had 10.5.x Macs included.

Screen Shot 2014-02-10 at 10.24.14 AM
Screen Shot 2014-02-10 at 10.25.34 AM
Screen Shot 2014-02-10 at 10.29.19 AM

For 10.6.x Macs:

I built a policy that was triggered by the manual trigger and had the Xerox Print Driver 2.112.0 installer as the package to be installed. I then scoped the policy to a smart group that only had 10.6.x Macs included.

Screen Shot 2014-02-10 at 10.25.13 AM

Screen Shot 2014-02-10 at 10.24.47 AM

Screen Shot 2014-02-10 at 10.29.49 AM

For 10.7.x through 10.9.x Macs:

I built a policy that was triggered by the manual trigger and had the Xerox Print Driver 2.113.0 installer as the package to be installed. I then scoped the policy to a smart group that only had 10.7.x – 10.9.x Macs included.

Screen Shot 2014-02-10 at 10.26.03 AM

Screen Shot 2014-02-10 at 10.26.22 AM

Screen Shot 2014-02-10 at 10.30.21 AM

Scoping the policies to smart groups ensured that only one policy could apply when the manual trigger was called by the script. This meant that the same manual trigger could be used with multiple policies, but that the individual Macs would only get the policy that applied to their specific operating system.

Once I had the script and policies in place, I updated my printer setup policy with the new printer settings and added the previously-mentioned script. When added, I set the script to Run Before and set the following values in the parameter blanks:

In the Parameter 5 blank – 2.94.3
In the Parameter 6 blank – 2.112.0
In the Parameter 7 blank – 2.113.0

Screen Shot 2014-02-10 at 1.48.44 PM

When the printer setup is selected, the script will run before the printer setup and do its version check.

Screen Shot 2014-02-10 at 1.49.23 PM

The other printer setup policy options were set as shown below:

Screen Shot 2014-02-10 at 2.02.24 PM
Screen Shot 2014-02-10 at 1.55.06 PM

The result is how it appears at the user’s end. When the printer setup is selected, the script will run before the printer setup and do its version check.

If new drivers are needed, a message will appear to inform the user that the drivers are being installed.

Screen Shot 2014-02-10 at 2.38.22 PM

Once the printer setup has completed, a message will then appear to let the user know that the printer setup has completed.

Screen Shot 2014-02-10 at 2.39.24 PM

I’ve also applied this approach to printer driver policies that are available in Self Service, independent of the printer setups.

Screen Shot 2014-02-10 at 3.16.08 PM

In this case, because I’m not as worried about people reinstalling drivers over and over again using the printer driver install policy, the policy does not have the script that figures out if the drivers are already installed. Instead, the policy just runs the manual trigger for setting up the requested printer drivers.

For our Canon printers, the printer driver install policy is set up like this:

Screen Shot 2014-02-10 at 12.52.08 PM
Screen Shot 2014-02-10 at 12.54.22 PM
Screen Shot 2014-02-10 at 12.53.23 PM

For our Xerox printers, the printer driver install policy is set up like this:

Screen Shot 2014-02-10 at 12.54.48 PM
Screen Shot 2014-02-10 at 12.55.19 PM
Screen Shot 2014-02-10 at 12.55.52 PM

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: