I think you have to figure out where the app really is. You’re now executing the directory. Under Mac OS X most apps are actually a directory to hide the actual files from the end user… eg TextEdit.app is opened like this:
Is there an easy way to open a file in its native app on OS X (or Windows for that matter) without knowing the path to the “real” app?
What I am aiming to do is give the user the ability to open a file stored in the database (such as a word file for instance) in its native app. Obviously I can write the file to a temp location, but what is the easiest way to open it in its app?
With Windows I can have a user define a set of preferences to get the path to the .exe file and then use that in conjuction with the above function, but, with what you say about OS X, this would more difficult to do.