Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Ulex

macrumors newbie
Original poster
Jul 16, 2004
2
0
Well, just curious… Windows has the registry… But OS X doesn’t seem to have one. So how OS X knows where the Applications are? Does it do a system scan when logging in? Does it create a register when I execute an application?

Suppose I insert a CD with an application inside. Does OS X automatically know that that application is there even without executing it?
 
This all works through LaunchServices which is very clever. Instead of having a registry that corrupts and gets bloated you have a combination of things. When the file system first opens a directory or volume it scans that for various things including apps. If any are found launch services queries their Info.plist files to see what file types they support. This is stored in a lookup in RAM (and possibly cached to disk). Other things like window position preferences and the like than many Windows apps store in the registry are stored in xml files in ~/Library/Preferences.

You can read all about it here.
 
robbieduncan said:
This all works through LaunchServices which is very clever. Instead of having a registry that corrupts and gets bloated you have a combination of things. When the file system first opens a directory or volume it scans that for various things including apps. If any are found launch services queries their Info.plist files to see what file types they support. This is stored in a lookup in RAM (and possibly cached to disk). Other things like window position preferences and the like than many Windows apps store in the registry are stored in xml files in ~/Library/Preferences.

You can read all about it here.
So if LaunchServices goes down, things like the open command in the Terminal will not work? Presumably the Finder handles some of these duties - what happens when it dies?
 
LaunchServices are a low level system thing. I don't think that they can die easily. If they totally bug out I imagine one of two things happens:

1) You computer cannot open files and applications properly!
2) Something (possibly the Finder) notices and restarts them/
 
robbieduncan said:
This all works through LaunchServices which is very clever. Instead of having a registry that corrupts and gets bloated you have a combination of things. When the file system first opens a directory or volume it scans that for various things including apps. If any are found launch services queries their Info.plist files to see what file types they support. This is stored in a lookup in RAM (and possibly cached to disk). Other things like window position preferences and the like than many Windows apps store in the registry are stored in xml files in ~/Library/Preferences.

Thanks, that’s a very explicit explanation. Just one academic situation: suppose I have Office X v. 1.5 installed on my OS X disk. Then I insert a CD with Office X v. 1.1 and I browse the CD with Finder. Then:

1st question: If I try to open a .doc file, which Office X will OS X use?
2nd question: Just by browsing the Office X 1.1 directory on the CD, will this change ANY setting or configuration of Office X 1.5 installed on my OS X disk?
 
As the app version number is stored in the Info.plist file I imagine that it would continue to use the correct version (as it has the highest version number). LaunchServices also has some sort of system where it ignores apps once it's seen them. As the bundle identifier for say Word is probably the same over versions it will ignore the second version it seems anyway.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.