Current Working Dir?

Dustin Navea speeddymon at
Fri Sep 5 15:35:10 CDT 2003

--- Vincent Béron <vberon at> wrote:
> Le ven 05/09/2003 à 15:34, Dustin Navea a écrit :
> > Well, I can tell you that the reason it didnt work in windows when
> running
> > from another directory is because the directory that update.ini (or the
> exe
> > file) is in probably wasnt in your path.. But either way, fixing the
> program
> > to get the exe's path will take care of it, until you or a user moves the
> > update.ini to somewhere that isnt in your path and isnt the same
> directory as
> > the exe.. lol
> The path (as in %path%) is only for executable files (.bat, .com, .exe,
> etc.). For data files (such as this update.ini), there was another
> command to search automatically in multiple directories called append.
> I'm not aware of an equivalent for Unix.

That is what I was referring to.  AFAICT he was referring to his command line
looking something like this:

C:\> cd somedir
C:\somedir> c:\myprogdir\myprog.exe

and the update.ini was in C:\myprogdir along with myprog.exe..  but the
reason that running it like that failed is because C:\myprogdir was not in
the %path%, so even tho myprog.exe could be found by the command prompt
(because of it being run with the directory specified), myprog.exe was
checking the cwd (C:\somedir) instead of C:\myprogdir, and so was unable to
fine the update.ini.  If you were to do:

C:\> set path=%path%;C:\myprogdir
C:\> cd somedir
C:\somedir> C:\myprogdir\myprog.exe

then it would be able to find update.ini because of the way DOS (and
therefore windows) works..

when looking for a file, it checks:

current working directory 
  yes ok
  no %path%
  yes ok
  no error (or in some winvers %windir%)
certain winvers %windir%
  yes ok
  no %systemdir%
certain winvers %systemdir%
  yes ok
  no error

hope that is understandable..  lol ;)

Dustin Navea

Minor Contributor,
Bugzilla Janitor,
Network Admin, irc:// (down)

Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software

More information about the wine-devel mailing list