Recently, I had a support query where a colleague had three “Flash Player” items in the open with menu when he right clicked onto a .swf file and I was asked to remove them. I learnt that it’s not as easy as it often is with Windows, where every file extension has an entry in the registry which you could edit. Mac OS X uses the so called LaunchServices database to assign applications to file types.
Now I didn’t find a way to edit this information, but there is another thing you can do (which actually helped): Having your Mac rebuild that database. This gets rid of duplicate entries as well as entries of applications that no longer exist on your mac. To do this, just open a terminal window and type the following:
/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user
After a few moments, your open with menus should be clean again.
If the lsregister app is not in that path, you may be able to find it with the locate command. You need the administrator password (the same you need when installing updates).
1. type sudo updatedb
(this will build an index of all files)
2. type sudo locate lsregister
(this will show you every location where a file or folder with “lsregister” in its name occurs)
Now when you found it, type /PATH_TO_LSREGISTER/lsregister -kill -r -domain local -domain system -domain user
and you’re done.