Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>All the applications installed under Mac OS X are registered in the <a href="http://developer.apple.com/mac/library/documentation/Carbon/Reference/LaunchServicesReference/Reference/reference.html" rel="nofollow noreferrer">Launch Services</a> database.</p> <p>The Launch Services framework contains a helper shell command <code>lsregister</code> which among other uses can dump the information stored in the Launch Services database. Under Mac OS X 10.5 and 10.6 that command is located in the following folder:</p> <pre><code>/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister </code></pre> <p>Using a few simple grep filters one can extract the full paths of all registered applications:</p> <pre><code>lsregister -dump | grep --after-context 1 "^bundle" | grep --only-matching "/.*\.app" </code></pre> <p>Putting it all together, the following AppleScript will compute the user visible names of all registered applications using the <a href="http://developer.apple.com/mac/library/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_cmds.html#//apple_ref/doc/uid/TP40000983-CH216-SW14" rel="nofollow noreferrer">info for</a> command:</p> <pre><code>property pLSRegisterPath : "/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister" set theAppPaths to every paragraph of (do shell script pLSRegisterPath &amp; " -dump | grep --after-context 1 \"^bundle\" | grep --only-matching \"/.*\\.app\"") set theNames to {} repeat with thePath in theAppPaths try copy displayed name of (info for (thePath as POSIX file)) to end of theNames end try end repeat choose from list theNames </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload