http://bugs.winehq.org/show_bug.cgi?id=23270
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |focht@gmx.net
--- Comment #2 from Anastasius Focht focht@gmx.net 2011-05-08 06:21:24 CDT --- Hello,
yes, CreateProcess() command line heuristics needs some overhaul to handle all this brokenness.
Consider another braindamaged app (pando installer), which tries to run an exe with a path containing whitespace without quoting:
--- snip --- ... 0022:Call KERNEL32.CreateProcessW(00000000,001a07d0 L"C:\Program Files\Pando Networks\Pando\Pando.exe",00000000,00000000,00000001,08000400,00000000,00000000,0540e330,0540e380) ret=007b1c53 0022:trace:process:create_process_impl app (null) cmdline L"C:\Program Files\Pando Networks\Pando\Pando.exe" 0022:trace:process:find_exe_file looking for L"C:\Program" 0022:trace:process:find_exe_file Trying native exe L"C:\Program" 0022:warn:process:create_process_impl (L"C:\Program",...): ignoring some flags in 8000400 0022:trace:process:create_process_impl starting L"C:\Program" as Unix binary 0022:Ret KERNEL32.CreateProcessW() retval=00000000 ret=007b1c53 ... 0022:Call ntdll.wcslen(026d87f0 L"Error creating child process: Access denied\r\n") ret=0071fcd2 ... --- snip ---
MSDN for reference: http://msdn.microsoft.com/en-us/library/ms682425.aspx
For "lpApplicationName" arg:
--- quote --- The lpApplicationName parameter can be NULL. In that case, the module name must be the first white space–delimited token in the lpCommandLine string. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin; otherwise, the file name is ambiguous. For example, consider the string "c:\program files\sub dir\program name". This string can be interpreted in a number of ways. The system tries to interpret the possibilities in the following order:
c:\program.exe files\sub dir\program name c:\program files\sub.exe dir\program name c:\program files\sub dir\program.exe name c:\program files\sub dir\program name.exe --- quote ---
For "lpCommandLine" arg:
--- quote --- If lpApplicationName is NULL, the first white space–delimited token of the command line specifies the module name. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the lpApplicationName parameter). --- quote ---
They probably apply similar heuristics for lpCommandLine to cope with braindamaged code that doesn't quote executable path.
Download: http://www.pando.com/dl/download/PandoSetupNCI.exe
$ wine --version wine-1.3.19-203-gf555c2d $ sha1sum PandoSetupNCI.exe d5cddcb7979f0423d1b8aa08d3b3c4b947381426 PandoSetupNCI.exe
Maybe the bug should be made more generic because there are various poorly coded apps that suffer from this.
Regards