KERNEL: force copying of DOS-style path into argv[0] of PE process (was: Re: Queries about some 'usability' points) - partially fixes #3542

Mike Hearn mike at
Mon Oct 31 15:45:43 CST 2005

On Mon, 2005-10-31 at 19:18 +0100, Molle Bestefich wrote:
> Uhm.  Explain to me how the above ratifies _not_ converting the
> Unix-style path to a Windows-style path before handing it to the app? 
> We ARE trying to emulate Windows, are we not?

Cut the sarcasm please, there's no need for that here. I've been
involved with Wine for several years now and am quite aware of the

Imagine the case of an app which changes to its program directory and
then does CreateProcess(..., "foo.exe", ...) and "foo.exe" assumes
argv[0] will not be absolute. This sort of thing happens.

Blindly changing argv[0] to always be of one form could break as much as
it fixes. In Wine, you *never* make such assumptions, instead you do
what Lionel said he wanted to do and test the actual behaviour
(preferably with unit tests to go with it). Then if we determine that
the problem is with apps that expect to be started by Explorer and not
via the command line, we can fix it (probably by making user-invoked
wine processes loop back through start.exe and changing the behaviour
there, but there might be another way).

thanks -mike

More information about the wine-devel mailing list