Criteria to build Smart Group of non-standard copies of an application (Firefox in this case)

pcrandom
Contributor

This seems really basic, but I'm having trouble. I'd like to build a Smart Group that will show me which Macs have non-standard copies of an application, Firefox in this case. We have people who've renamed their copy of Firefox to other names, like "Firefox 2" or "FirefoxOld" or "Test Firefox" or "Firefox 3.6" (yes, really--v3.6.28).

The SG criteria seems pretty straight forward:

  • Application Title - has - Firefox
  • Application Title - is not - Firefox.app

The problem is that all of these systems also have a standard copy of Firefox.app, which means the results I get with the above criteria is a big fat nada.

I can't even do the ol' create-another-smart-group-and-use-not-a-member-of to filter, because it also filters out all systems that have Firefox.app installed.

I can do a regular Application search with *Firefox* in the first field, which does catch all the variations that contain the word "Firefox" and with that I could manually build a Static Group, but then it wouldn't catch future instances automatically.

Am I missing something simple? Any way to do this in a Smart Group?

2 REPLIES 2

Look
Valued Contributor III

You could use an extension attribute with a script to detect the none standard versions, this would of course be application specific though.
Something like.

if [[ "$(ls -1 /Applications/ | awk '/Firefox/ && !/^Firefox.app/')" ]]; then
echo "<result>TRUE</result>"
else
echo "<result>FALSE</result>"
fi

pcrandom
Contributor

Thanks @Look. I was hoping to avoid that and have something that's more universal but looks like that may be the best way to go.