full path of an executable

full path of an executable

Post by Vladimir Votiako » Sat, 09 Oct 1999 04:00:00



Hi all,

How can I obtain fully resolved path of an executable
(argv[0] is not sufficient)

For example in WIN32
GetModuleFileName() function retrieves the full path and filename
for the executable file containing the specified module

vladimir

 
 
 

full path of an executable

Post by Eric Meij » Sat, 09 Oct 1999 04:00:00


: Hi all,
:
: How can I obtain fully resolved path of an executable
: (argv[0] is not sufficient)
:
: For example in WIN32
: GetModuleFileName() function retrieves the full path and filename
: for the executable file containing the specified module

This is covered in the faq of this newsgroup (see, e.g.,
http://www.whitefang.com/unix/faq_toc.html) items 1.14 and 1.14.1.
In short: there is no reliable/portable way.

HTH,
Eric.

--

 Eindhoven Univ. of Technology
 Lab. for Catalysis and Inorg. Chem. (SKA)

 
 
 

1. How to get the full path of an executable

Hello.

I need to get the full path of an executable from inside the
program. I know, that I can just look into /proc/PID/exe, but I need a
method, that is a bit more portable between other unix-systems.

Any help will be appreciated!
Thanks
Stephan

--
/~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\

| >>> ...destination anywhere,                       -\<,    |
| >>> east or west, I don't care...                (*)/(*)   |
| WWW:   http://www.tzi.de/~stk                              |
\____________________________________________________________/

PS: Ich widerspreche der Nutzung oder Uebermittlung meiner
Daten fuer Werbezwecke oder fuer die Markt- und Meinungsforschung

(28 Abs. 3 Bundesdatenschutzgesetz)

2. Great older computer - looking to improve performance!

3. How to get the full path of an executable program from within that program itself

4. Mount A Atapi Zipdrive!??

5. How to get the full path of an executable from within it

6. Need driver for NEC SCSI CD-ROM

7. how to get process' full path name + executable

8. Seagate ST3215!N hard drive

9. howto retrieve the full qualified path of running executable

10. How to expand paths in $PATH like "~/bin" to full path?

11. Extracting full path name from ~user/path

12. How to determine if (executable) file is in path?

13. How to get the executable's path?