Are you asking in relation to the Casper Suite, or is this more a general Mac question?
More of a general mac scripting question.
Are you trying to find a way to make smart groups based on versions of Flash and Java? That would be handy.
I'm sure there are plenty of ways to do this, I know of two for certain. We've had several discussions on this list going back to before it was JAMFNation, about how to gather Flash or Silverlight versions. Here are a couple of those dicsussions:
https://jamfnation.jamfsoftware.com/discussion.html?id=3468
https://jamfnation.jamfsoftware.com/discussion.html?id=28
Basically, if you use the `defaults read` command, you can grab the bundle version for just about any plug in or app on the system. You can then use that information to build an extension attribute (EA) if you are using Casper, or whatever else for whatever other program you might be using. So, for example, to grab the Flash version you'd use:
flashVersion=`defaults read /Library/Internet Plug-Ins/Flash
Player.plugin/Contents/Info CFBundleShortVersionString`
If you wanted the version of Firefox (since they seem to be updating once a week):
firefoxVersion=`defaults read /Applications/Firefox.app/Contents/Info CFBundleShortVersionString`
And so on. Like I said, you can swap out just about any app or plug in you want.
As always, test, test, test, and test again before deploying.
HTH
Steve