@denmoff][/url][/url - It might be possible to have a single script work with almost any install. What you'd need to do is set up a script parameter that would be the path to the Info.plist file for the installed application to grab either the "CFBundleVersion" or "CFBundleShortVersionString" Then a second script parameter that holds the version string you expect to see,
Take a script like the below for example:
#!/bin/sh
pathToPlist="$4"
expectedAppVers="$5"
## Quick check to make sure $4 and $5 are set
if [[ "$4" == "" ]] || [[ "$5" == "" ]]; then
echo "Script paramaters are not set for this script. Please set up parameters 4 & 5 for this script as appropriate"
exit 1
fi
installedAppVers=$( /usr/bin/defaults read "$4" CFBundleShortVersionString )
if [[ "${installedAppVers}" != "${expectedAppVers}" ]]; then
echo "App installs may have failed. Exiting silently..."
exit 1
else
echo "App install successful. Notifying user"
## do cocoaDialog stuff here, or call a function block, for example:
"/Library/Application Support/JAMF/bin/cocoaDialog.app/Contents/MacOS/cocoaDialog" notify
--no-growl --title "Flash Player" --text "Flash Player has been updated on your Mac."
--background-top ffffff --background-bottom ffffff --text-color 000000 --alpha 1
fi
Save this script somewhere and run it with the following syntax as a test-
sudo jamf runScript -script "scriptname.sh" -path "/path/to/script/" -p1 "/Library/Internet Plug-Ins/Flash Player.plugin/Contents/Info.plist" -p2 "13.0.0.182"
This will send up a white "bubble" cocoaDialog message with the text indicated only if FlashPlayer is updated to or is version "13.0.0.182", otherwise it exits silently.
You could conceivably also place all the messaging text into script parameters, like $6 and $7 as well to make it really flexible. Since using defaults against a plist is a pretty standard way to get version information for Apps, plug-ins, etc, I'd imagine this could be used for most checks. Although it may not work with certain installations.