delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/06/09:32:21

From: "Damien" <damien@%poe.org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Determining the path of the executable at runtime
Date: 3 Sep 1997 05:50:38 GMT
Organization: Beyond Reality
Lines: 18
Message-ID: <01bcb82c$cf0ae200$638562cf@damien>
References: <927cd$11e31 DOT 3dd AT news DOT eznet DOT net>
NNTP-Posting-Host: phx-ts20-2.goodnet.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Karl Garrison <karlos AT eznet DOT net> wrote in article
<927cd$11e31 DOT 3dd AT news DOT eznet DOT net>...
> I am making a HTML editor that will look for configuration files and the
> like in the same directory as the executable.  I don't want to force the
> user to install in a particular directory, or make them add enviroment
> variables to their autoexec.bat.

It sounds to me like the only reason you want the path the program is in is
to find the config files.  Is that correct?  If so, all you need to do is
open the file with only the file name.  That way it will look in the
current directory, which should be the one your program is in.

-- 
  -=Damien=-
damien@%poe.org
(remove the % to reply... no spambots allowed)
http://www.goodnet.com/~ej70339/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019