Skip to content

Instantly share code, notes, and snippets.

@dderusha
Created January 18, 2016 18:33
Show Gist options
  • Save dderusha/09e29f381c0eed9aa5ad to your computer and use it in GitHub Desktop.
Save dderusha/09e29f381c0eed9aa5ad to your computer and use it in GitHub Desktop.
Flash Extension Attribute
#!/bin/sh
#
############################################################################
#
# Extension Attribute checks to display Adobe Flash Player Version with Release number.
#
# Uses CFBundleShortVersionString because this is the "release version number of the bundle"
# Ref: https://developer.apple.com/library/IOS/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
#
############################################################################
if [ -d /Library/Internet\ Plug-Ins/Flash\ Player.plugin ] ; then
flashVersion=$( defaults read /Library/Internet\ Plug-Ins/Flash\ Player.plugin/Contents/version CFBundleShortVersionString )
echo "<result>$flashVersion</result>"
else
# the number 55 is just a placeholder for "Not Installed" represented by a number
echo "<result>55</result>"
fi
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment