View Full Version : List of installed aps and version info

05-06-2007, 05:32 PM

Recently I re-installed my system after getting a new hard drive. I found that I wished I had kept an up-to-date list of all the applications I had installed on the old system. I've cobbled together a little Applescript that reports every installed application and (for most of them) its version info. I set it to run every day, so next time I'll know what I've forgotten to install.

I relied in part on this hint (http://www.macosxhints.com/article.php?story=20061126015107894), but added some Applescript to get the version information in addition the application's path.

The script is below. My question is, do you think this is worthwhile submitting as a hint?

set appString to do shell script "mdfind 'kMDItemContentTypeTree == \"com.apple.application\"c' | sort"
set appList to every paragraph of appString
set theReport to ""
repeat with i from 1 to number of items in appList
set theItem to item i of appList
set theApp to (a reference to POSIX file theItem)
set fileInfo to info for theApp
set versionInfo to long version of fileInfo
if versionInfo is missing value then set versionInfo to " "
set theReport to theReport & theItem & " " & versionInfo & return
end repeat
do shell script ("echo " & quoted form of theReport & " > ~/Documents/Software/Report.txt")


05-06-2007, 08:10 PM
If you launch System Profiler and click on the Applications line, you will already get a list of your installed applications and versions. Click on an application in the list, and you get Version, Last Modified, Kind, Get Info String, and Location.


05-06-2007, 10:42 PM
Thanks, Trevor. AFAIK one can't automate Profiler to output the Applications information to a file. That's what I'm after: something that will run periodically without my intervention so I will always have an up-to-date list of apps I have installed.


05-06-2007, 11:43 PM
I haven't tried your script so I don't know how the results would compare, but the command line version of "system_profiler" makes outputing an application list to file fairly straightforward. Eg./usr/sbin/system_profiler SPApplicationsDataType > ~/Desktop/applist.txt

05-06-2007, 11:49 PM
actually, I think this would be much simpler as an automator workflow than as an applescript. personally, I try to avoid shell scripting where possible (though that's just me...) :)

05-07-2007, 10:59 AM
biovizier, your solution works very well, except that system_profiler (GUI or CLI) does not list apps that I've installed in a non-standard place. I have my /Users folder on a separate partition, and I keep a lot of apps there. The Applescript finds these. I've no idea how System Profiler decides where to look for applications.

tw, are you saying that an Automator workflow can list all installed Applications? If so I'd love to know how.

05-07-2007, 02:23 PM
tw, are you saying that an Automator workflow can list all installed Applications? If so I'd love to know how.

finder action "Find Finder Items" - set it to find things whose Kind is Application
automator action "Run Applescript" - there's no automator action that I've found that extracts file info (though I may make one this week, if I can get around to it), so you'll have to pull in an applescript that extracts and formats what you want.
textedit action "New Text File" - write it out to disk