Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Mac > Mac Programmer Tools > Re: how to find...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 555 of 637
Post > Topic >>

Re: how to find out, whether an application is installed on the MAC

by Lawson English <LawsonE@[EMAIL PROTECTED] > Sep 6, 2006 at 09:57 AM

Lawson English wrote:
> Chris Hanson wrote:
>> On 2006-08-29 02:33:42 -0700, "kunal" <talktokunal@[EMAIL PROTECTED]
> said:
>>
>>> how to find out, whether an application is installed on the MAC or
>>> not....??
>>
>> The only sure way to know is to exhaustively search all mounted
volumes.
>>
>> What is it that you're really trying to accomplish?
>>
>>  -- Chris
>>
> 
> 
> There used to be a registry file of  applications under MacOS Classic. 
> Are you saying that there isn't one under MacOS X? I can see how generic

> UNIX executables might not be registered, but it seems very lax of Apple

> not to create and continuously update a registry of all .app executables

>  in order to assist the Finder with doing its job.
> 
> In fact, I'm almost certain there is one. Perhaps there's no API for 
> applications programers to use it,  but I don't think the Finder could 
> display as fast as it does at startup without a cache of this kind of 
> info available somewhere...
> 

I knew there had to be something. Check out Launch Services. There 
should be a way of grabbing the info it maintains:



http://developer.apple.com/do***entation/Carbon/Conceptual/LaunchServicesConcepts/index.html#//apple_ref/doc/uid/TP30000999

Registering Applications

All applications available on the user’s system must be registered to 
make them known to Launch Services and copy their do***ent binding and 
other information into its database. It isn’t ordinarily necessary to 
perform this task explicitly, since a variety of utilities and services 
built into the Mac OS X system software take care of it automatically:

A built-in background tool, run whenever the system is booted or a new 
user logs in, automatically searches the Applications folders in the 
system, network, local, and user domains and registers any new 
applications it finds there. (This operation is analogous to “rebuilding 
the desktop” in earlier versions of Mac OS.)
The Finder automatically registers all applications as it becomes aware 
of them, such as when they are dragged onto the user’s disk or when the 
user navigates to a folder containing them.
When the user attempts to open a do***ent for which no preferred 
application can be found in the Launch Services database, the Finder 
presents a dialog asking the user to select an application with which to 
open the do***ent. It then registers that application before launching it.
In spite of these automatic registration utilities, it may sometimes be 
necessary to register an application explicitly with Launch Services. 
For example, although developers are encouraged to package their 
applications so that they can be installed by simply dragging them onto 
the user’s disk, some applications may require more elaborate custom 
installer software. In such cases, the installer should call the Launch 
Services function LSRegisterFSRef (or LSRegisterURL) to register the 
application explicitly.
 




 5 Posts in Topic:
how to find out, whether an application is installed on the MAC
"kunal" <tal  2006-08-29 02:33:42 
Re: how to find out, whether an application is installed on the
Chris Hanson <cmh@[EMA  2006-08-29 03:16:12 
Re: how to find out, whether an application is installed on the
Lawson English <Lawson  2006-09-06 09:19:34 
Re: how to find out, whether an application is installed on the
Lawson English <Lawson  2006-09-06 09:57:15 
Re: how to find out, whether an application is installed on the
Bob Harris <nospam.New  2006-08-30 01:29:15 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Nov 22 3:10:08 CST 2008.