Help needed in launching an app from the Desktop

I am trying to launch an application from the desktop. I need to do this on multiple machines and since the Desktop is located at different locations on different machines, I need to find the Home directory first.

Here is what I am doing,
tell application “Finder”
set homdir to home as alias
end tell
launch application & homdir & “Desktop:dir1:dir2:App1.app”

It cannot find the application. I am guessing there is some problem with the way I am accessing it.

If I hardcode the location, the launch application succeeds.
I am running this on Tiger.

Hi,

actually this is sufficient, launch services know, where the app is


launch application "myApp"

path to desktop is a reference to the desktop of the current user.
If you want a path reference, use this


launch application ((path to desktop as Unicode text) & "dir:dir:App1.app")