Inconsistent Spotlight file associations

1

I have some documents - mostly XLS files - which have different file associations in Spotlight than in Finder. The XLS opens the way I want in Finder, with Mac MS Excel, but when I try to open it immediately from Spotlight it retains a previously assigned association, which is with Windows Excel in Parallels.

How can I reset these Spotlight-specific associations to be consistent with what I set in Finder?

I'm on Leopard (10.5.8)

ttarchala

Posted 2009-11-30T10:55:10.343

Reputation: 771

Answers

1

The easiest option is to rebuild your Launch Services cache by running the following command in Terminal.app:

10.4 and earlier:

/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user /

10.5 and newer:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user /

Coincidentally for better or worse, in Snow Leopard, Apple has dropped support for types of documents to have different creators (eg. Have an .xls open in one app (eg. Excel for Mac) but another in another app (eg. Numbers))

Chealion

Posted 2009-11-30T10:55:10.343

Reputation: 22 932

I am afraid there is no "/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LaunchServices.framework" directory on my Mac. I only found it in the /Developer hierarchy, and it does not contain the lsregister executable. – ttarchala – 2009-12-01T10:04:18.230

@ttarchala: Sorry - added the proper path for 10.5 and 10.6 – Chealion – 2009-12-01T16:32:04.987

This worked, but I had to restart before I could see the results. – ttarchala – 2009-12-02T16:12:38.567

1

Actually the easiest way is to select an '.xls' file in the Finder and do a Get Info on it.

Then under the "Open with" section select the app you want it to open with (If the app you want is already selected chose another app then set it back).

Then click the Change All... button which will associate all files of that type with the application you chose.

cOle2

Posted 2009-11-30T10:55:10.343

Reputation: 356

I've already done that a couple of times. It works in Finder, but does not help with the Spotlight association. – ttarchala – 2009-12-01T10:04:54.970

Strange, I just associated .xls files with Numbers using the method above and while the icon spotlight displays is wrong they do open with Numbers now. The only thing I can think of to try is to rebuild the spotlight index with: sudo mdutil -E but it will take some time and resources. – cOle2 – 2009-12-01T15:17:18.810