Re: Discovering Applications
Re: Discovering Applications
- Subject: Re: Discovering Applications
- From: Christopher Nebel <email@hidden>
- Date: Mon, 3 Jan 2005 12:02:13 -0800
On Jan 3, 2005, at 11:40 AM, Vince Cordaro wrote:
This is more geared towards Install Anywhere but I maybe able to do
this using Applescript. What I want to do is check to see if an
application is installed. Install Anywhere seems to be able to look
but requires a UUID which I cannot seem to find. However, I can run
an applescript so if I can get an applescript to check for the
application that would work. Anyone have any ideas?
The central repository for this information is Launch Services; the
Finder will let you get at it via its "application file" class:
tell application "Finder"
-- check if TextEdit is present:
exists application file id "ttxt" -- look by old-school signature.
exists application file id "com.apple.TextEdit" -- look by new-school
bundle ID
-- get the actual location:
application file id "com.apple.TextEdit" --> application file
"TextEdit.app" of folder "Applications" of startup disk of application
"Finder"
end
To determine the signature or bundle ID for an application, use
AppleScript's "info for" command on it, and look for the "file creator"
and "bundle identifier" keys. (Assuming you're using Panther, that is;
otherwise you'll have to dig around in the Info.plist.) Both values
are case-sensitive.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden