KERNEL: force copying of DOS-style path into argv[0] of PE process

Alex Villací­s Lasso a_villacis at
Mon Oct 31 17:20:06 CST 2005

Jesse Allen wrote:

>On 10/31/05, Mike Hearn <mike at> wrote:
>>On Mon, 31 Oct 2005 12:08:36 -0500, Alex Villací­s Lasso wrote:
>>>This is a patch to fix the primary bug on DungeonKeeper. I am surprised
>>>this bug was overlooked up to 0.9, since this is such a basic
>>>characteristic of Windows.
>>I think the conclusion last time we looked at this was that this is
>>actually a characteristic of Explorer, not Windows, and so it's really
>>caused by the fact that most Wine users run the apps from the command line
>>not via the shortcuts. If you run Dungeon Keeper in the wrong way from the
>>command line in Windows it'll crash too IIRC.
>This is a quite interesting theory.  So I went ahead and tried to
>launch LogicWorks with a "windows" method in wine, and well, I've
>failed so far with wine's ProgMan.exe.  The progman crashes anyway
>I've tried.
>So I boot to windows and try logicworks from cmd.exe.  Indeed, I hit
>the same bug as in wine.  So what we have are programs that expect a
>certain behavior and the command line doesn't do it.  Bad design.
>So could we have a program or launcher in wine to launch programs the
>"windows" way?
Hmmm... this raises doubts on whether the behavior should be implemented 
at all. What version of Windows are you using? Does your version supply 
a COMMAND.COM (in WinXP, it is at c:\windows\system32)? Have you tried 
running your program from COMMAND.COM? I would guess that COMMAND.COM 
supplies a fully qualified path to the executable file (as in MS-DOS and 
Windows 9x), but WinNT/WinXP do not when CMD.EXE is used (???). Then, 
explorer.exe supplies the fully qualified path at all times - that is 
why the programs do not crash when started from the shortcuts.

So, what should be the policy in Wine? Should Wine supply the qualified 
name at all (I still think it should)? Mr. Julliard sent a patch 
proposal that conditionally sets the name. I will try it at home and 
report on it tomorrow.

Alex Villacís Lasso

More information about the wine-devel mailing list