Current Working Dir?
R.J.Shearman at warwick.ac.uk
Fri Sep 5 08:55:59 CDT 2003
> -----Original Message-----
> From: wine-devel-admin at winehq.org [mailto:wine-devel-admin at winehq.org]On
> Behalf Of Fabian Cenedese
> Sent: 05 September 2003 13:39
> To: wine-devel at winehq.org
> Subject: RE: Current Working Dir?
> Well, I don't know if ever ran this program on wine before, but it's a
> simple command line tool, I didn't imagine any problems no matter if
> it worked before or not.
> I start it with wine c:/path/to/file.exe, so I guess the current working
> dir can be anything.
Yes, this is the point. When a program asks to open "Update.ini" then it
looks in the current working directory. Unless the current working directory
is the same as the app directory (i.e. the same directory as the file
"Update.ini") then it won't find it. This is the same behaviour as on
> I just tried on windows by calling it from the command line in a different
> directory and guess what: it didn't work either. But that never showed
> up as this is usually started from the windows explorer.
Exactly, Windows Explorer, by default, sets the current directory to the
directory that the app is in.
> Mea culpa. I need to fix this prog then to first get the dir of the exe.
No fixing is needed at all. You just need to either "cd /c/path/to" or run
wcmd and do "cd \path\to" and then run the program. This is the same
behaviour and you would find in cmd on Windows (NT).
More information about the wine-devel