Skip to main content

Anyone have an EA to report back what versions of FileMaker Pro are installed on Mac? I presume the folder itself would be a good thing to check:

/Applications/FileMaker Pro 12

PS, New request from a group, they want to see where they are before deciding to upgrade to version 12 that was just released.

Thanks,
Don

won't that be in the inventory already as an installed app?


@rockpapergoat Yessir, but if we have our analysts pull an advanced search under "Computers", they'll then need to dig into the "Details" link for each Mac. If they pull a search under "Applications" they won't be able to export the result.

So what we are trying to do is set up an EA so advanced searches under "Computers" will show a field with each instance of /Applications/FileMaker Pro on the Mac.

Don


Something like the following help?

#!/bin/bash

app="FileMaker"

AppPath=$(find /Applications/ -name "$app*.app" )

if [ -e "$AppPath" ]; then version=$(defaults read "$AppPath"/Contents/Info.plist CFBundleVersion)
fi

echo "<result>$version</result>"


similar to this previous script i wrote:

https://github.com/rockpapergoat/scripts/blob/master/misc/get_app_version.rb

this one formats the output for use as an extension attribute.

if you run it as a standalone script, the value of $4 (ARGV[3] in ruby) will be used as the app name to check. otherwise, you can remove the positional arguments check and pass whatever you want.

https://gist.github.com/2315784


@leslie Thanks, I'll give this a go.

@rockpapergoat, I'll have a look at your solution when I get a chance on Monday.