Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!think.com!spool.mu.edu!uunet!zephyr.ens.tek.com!gvgpsa!gold.gvg.tek.com!shaunc From: shaunc@gold.gvg.tek.com (Shaun Case) Newsgroups: comp.os.msdos.programmer Subject: Re: Where's the executable located? Message-ID: <2613@gold.gvg.tek.com> Date: 25 Jun 91 01:37:49 GMT Article-I.D.: gold.2613 References: <1991Jun24.133431.10280@druid.uucp> Distribution: comp Organization: Grass Valley Group, Grass Valley, CA Lines: 18 In article <1991Jun24.133431.10280@druid.uucp> darcy@druid.uucp (D'Arcy J.M. Cain) writes: >In melling@cs.psu.edu (Michael D Mellinger) writes: >>If my program is in someone's path, how can I tell where it's located >>so that I can get the supporting files that are needed with it? > >This is real easy in DOS. argv[0] is the full pathname of the invoking >process. I often do something like this: > ... assuming you are using a version of dos above 2.10, which does not support argv[0]. People are still using it, unfortunately. -- shaunc@gold.gvg.tek.com -- 100,000, perhaps 200,000 or more Iraqis died in a "Turkey Shoot" inappropriately called a "war." -- Michael Albert