[Bug 39932] bat-script with quotes cann't be called using CreateProcess

wine-bugs at winehq.org wine-bugs at winehq.org
Sun Jan 10 03:29:50 CST 2016


https://bugs.winehq.org/show_bug.cgi?id=39932

--- Comment #3 from andrej.skvortzov at gmail.com ---
Sebastian, I agree with you about complexity of cmd.exe code and
kernel32/process is not the perfect place to fix this bug. But I decided to fix
the issue in kernel32/process, because original cmd.exe (from Windows) can't
run command line like this:

cmd.exe /c "test.bat" param1 "param2" "param3".

It fails with an error:
"test.bat" param1 "param2" "param3" is not recognized as an internal or
external command
If we want to duplicate all functionality of cmd.exe, we need to repeat error
cases too. Therefore I decided to remove quotes before cmd.exe is executed,
i.e. in kernel32/process.

Code in cmd.exe that removes quotes is written to handle option /S:

/S    Strip " quote characters from command.
         If command starts with a quote, the first and last quote chars in
command
         will be removed, whether /s is specified or not.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list