Launch App by Path, Not Name

Greetings, folks!

I need to launch an app via the path to the app, as whenever I do a “Safe Boot,” the Launch registry can’t find my applets anymore. Obvious choices don’t work (as examples):

open “/Applications/TextEdit.app”
run app “/Applications/TextEdit.app”
run app (alias “HD:Applications:TextEdit.app”)

And I would prefer not to tell Finder to do it . . .

Thoughts?

Thanks!

Model: 2.33GHz MBPC2D
Browser: Google Chrome 5
Operating System: Mac OS X (10.6)

Wait . . .

For some reason, it’s now working:

run application “/Applications/TextEdit.app”

Sorry for the bother; I’ll repost if I have any other related issues.

Sorry!

You would rather use AppleScript’s path system.

activate application ":Applications:TextEdit.app"

You could use the shell command “open”:

choose application
path to result
do shell script "open " & quoted form of (POSIX path of result)

Hope it helps,
ief2

Unlike POSIX paths which start with a / representing the startup disk,
HFS paths must start with a disk name, a leading colon does not work

A relative path like path to applications folder avoids the problem to specify the startup disk


activate application ((path to applications folder as text) & "TextEdit.app")

Hello.

I found it timely to post this link which is all about finding libraries fast really.

The thing is that it is usable to convert for applications if you for some reasons need to know the exact path of an application.

As I have learned, which may not still be true is that you can’t just “tell” an applet to activate or whatever, since the applet (at least before it has had its info.plist file edited so that it will register as an application) will have an unknown path to a script.

Hopes this comes in handy for someone.

Best Regards

McUsr