List all apps registered with LaunchServices

Oct 11, '04 09:24:00AM

Contributed by: aqsalter

Basically, OS X LaunchServices is how an application is found to run when you double-click on a document. If the program is in /Applications, or you launch it at least once, then LaunchServices should detect it. LaunchServices contains a big, long list of all the Applications, and which ones accept documents of which type. So if you have an Application that is not "registering" correctly with LaunchServices how do you check it's information? Try this in the Terminal:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/\
Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -dump
You should be able to copy and paste that, thanks to the backslash. But if you can't, just make it one long line with no added spaces. This command will list all LaunchServices information. The output will look something like this:
B00001572  APPL/ddsk  Thu Aug  5 21:25:59 2004  DiskImageMounter.app
           -pad----hn---s--A----       v76.4.0  DiskImageMounter
           Contents/Resources/diskcopy.icns     com.apple.DiskImageMounter
           Contents/MacOS/DiskImageMounter      12556, 1728655, Mach-O
           V00000008 /System/Library/CoreServices/DiskImageMounter.app

C00001344  NDIF disk image
           viewer, default, apple, Contents/Resources/diskcopy-doc.icns
           .ndif, 'dimg', 'hdro', 'rohd', 'hdcm'

C00001351  NDIF disk image segment
           none, default, apple, Contents/Resources/diskcopy-doc.icns
           .imgpart, 'dseg'
           
           ....
The B entries list the programs' basic info (in this case, for DiskImageMounter.app). The C entries below that show which file types the program will accept, with both a description and a list of extensions. So there you have it; everything your machine know about. But the question is ... how do you clean out all the applications registered on unmounted DMG volumes which show at the end of the list?

[robg adds: To me, at least, it seems this hint is mostly in the "hmm, that's interesting" category, as I can't see any way to directly modify or change the info it holds (not that you would want to do so under any normal circumstances!). So give it a whirl if you'd like to see every app that your system knows about; you might want to put | more (or | less) at the end of the command to control the paging.]

Comments (7)


Mac OS X Hints
http://hints.macworld.com/article.php?story=2004100508111340