how to get the location of a program
how to get the location of a program
- Subject: how to get the location of a program
- From: "w.o.b" <email@hidden>
- Date: Tue, 19 Apr 2005 16:10:52 -0700 (PDT)
- Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
Hi,
Is there a way in OS X to get the full path of a
program where it's being executed?
I need to know the location where the user stores my
program (along with some configuration files), to set
up its running environment.
Things like "getcwd" only work when you run the
program in a Terminal. When you run it from Desktop or
Finder, the "getcwd" gives the current user home
directory.. "argv[0]" sometimes gives full path, but
sometimes just gives the program's name itself..
Thank you very much for help!
Best,
Owen
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden