Posted on 03-16-2017 06:15 AM
version_line=$(/usr/libexec/PlistBuddy -c "Print:Bomgar-Version" "/Library/Documentation/B-Info.plist" 2>/dev/null)
if [ $? != 0 ]; then
echo "none"
else
echo $version_line
fi
exit 0
I have this but my issue is the .app file has a diffrent name for each mac.
Its the Bomgar.app but the name has a ID tied into it example bomgar-scc-1234567-123456.app
How can I use the above code to look at the plist file inside the contents of this .app file.
example code
version_line=$(/usr/libexec/PlistBuddy -c "Print:CFBundleGetInfoString" "/Users/Shared/bomgar-scc-1234567-123456.app/Contents/Info.plist" 2>/dev/null)
if [ $? != 0 ]; then
echo "none"
else
echo $version_line
fi
exit 0
Posted on 03-16-2017 07:27 AM
I'm currently using the Extension Attribute below to determine the version of the Jump Client.
bomgarpresent=$( /bin/ls -d /Users/Shared/bomgar* | /usr/bin/awk -F "Contents" '{ print $1 }' | /usr/bin/cut -d ':' -f1 )
result=$( /usr/bin/defaults read $bomgarpresent/Contents/Info CFBundleGetInfoString | /usr/bin/cut -d ' ' -f1 )
/bin/echo "<result>$result</result>"