Bradford Persistent Agent Version Extension Attribute

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-06-2013 01:28 PM
Just spent some time trying to figure this out and thought I would add it to the general KB for y'all. If you are using the Bradford Persistent Agent and noticed that their packaging doesn't always match their actual version, here's the script to the get the actual version number, directly from the Menu Bar Item of the app.
#!/bin/sh
# By Chris Tangora
# Reads the Bradford Persistent Agent's menubar item's file to find the proper version number.
if [[ -e /Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Resources/bncsaui.xrs ]]; then
BPAv=$( zipgrep Version /Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Resources/bncsaui.xrs | sed -e 's|.*Version: ||' -e 's|<br.*||' )
echo "<result>$BPAv</result>"
else
echo "<result>Not Installed</result>"
fi
exit 0
Hope this can help someone else as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-07-2013 04:42 AM
@ctangora - thanks for the extension attribute !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 02-07-2013 05:03 AM
Glad to hear others are using this too... Thanks ctangora.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 11-12-2014 09:25 AM
Much obliged to you kind sir!!!
Many compliments on your profile pic of Allan from "The Hangover". That, is, rockin' and I owe you a Beer at the next Jamf National Conference!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 10-01-2015 11:26 AM
We're moving onto a newer version which has changed code in the Bradford Agent. I've updated the Ext Attribute. See Below...
!/bin/sh
#####################
Original Code By Chris Tangora
Updated by Christopher Miller
of ITSD-ISS for JHU-APL
Dated: 20151001
#####################
Look for the newer app version info
if [[ -e "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" ]]; then BPAv=$(/usr/bin/defaults read "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Info.plist" | grep CFBundleGetInfoString | awk {'print $3'} | sed -e 's/[";]//g')
Look for the older app version info
elif [[ -e "/Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Resources/bncsaui.xrs" ]]; then BPAv=$( zipgrep Version /Library/Application Support/Bradford Networks/Persistent Agent/CSA.app/Contents/Resources/bncsaui.xrs | sed -e 's|.Version: ||' -e 's|<br.||' )
If neither file found, 'taint installed
else
BPAv="Not Installed"
fi
Spit out the result
echo "<result>$BPAv</result>"
exit 0
