[Bug 25738] New: cmd.exe: enclosing quoting of builtin command and parameters confuses cmd.exe (Windows PowerShell 2.0 installer)
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun Jan 9 13:15:12 CST 2011
http://bugs.winehq.org/show_bug.cgi?id=25738
Summary: cmd.exe: enclosing quoting of builtin command and
parameters confuses cmd.exe (Windows PowerShell 2.0
installer)
Product: Wine
Version: 1.3.11
Platform: x86
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: cmd
AssignedTo: wine-bugs at winehq.org
ReportedBy: focht at gmx.net
Hello,
while installing Windows PowerShell 2.0 I noticed a flood of following console
messages during install:
--- snip ---
wine: cannot find L"C:\\windows\\system32\\del.exe"
File not found
--- snip ---
The update.inf file being processed contains the following actions:
--- snip ---
; After File Copy
[ProcessesToRun]
...
"""%windir%\system32\cmd.exe""" /c """del /F /Q
"""%windir%\system32\WindowsPowerShell\v1.0\System.Management.Automation.dll""""""
"""%windir%\system32\cmd.exe""" /c """del /F /Q
"""%windir%\system32\WindowsPowerShell\v1.0\%ReleaseNotesDir%\System.Management.Automation.resources.dll""""""
"""%windir%\system32\cmd.exe""" /c """del /F /Q
"""%windir%\system32\WindowsPowerShell\v1.0\Microsoft.PowerShell.ConsoleHost.dll""""""
...
--- snip ---
That section was probably automatically created hence the ridiculous quoting -
it is nevertheless valid.
The relevant trace log (+cmd):
--- snip ---
0023:trace:process:CreateProcessW app (null) cmdline
L"\"C:\\windows\\system32\\cmd.exe\" /c \"del /F /Q
\"C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\"\""
...
0036:trace:cmd:wmain Command line parm: 'L"C:\\windows\\system32\\cmd.exe"'
0036:trace:cmd:wmain Command line parm: 'L"/c"'
0036:trace:cmd:wmain /c command line: 'L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""'
0036:trace:cmd:WCMD_DumpCommands Parsed line:
0036:trace:cmd:WCMD_DumpCommands 0x1271e0 0 00 (nil) L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""
Redir:L""
0036:trace:cmd:WCMD_process_commands Executing command: 'L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""'
0036:trace:cmd:WCMD_execute command on entry:L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""
(0x33f4f8), with '(null)'='(null)'
0036:trace:cmd:WCMD_execute Command: 'L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""'
0036:trace:cmd:WCMD_execute param1: L"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll",
param2: L""
0036:trace:cmd:WCMD_run_program Searching in 'L"C:\\windows\\del \\F \\Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\"' for
'L"Microsoft.PowerShell.ConsoleHost.dll"'
0036:trace:cmd:WCMD_run_program ASSUMING INTERNAL
0036:trace:process:CreateProcessW app (null) cmdline L"\"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll\""
0036:trace:process:find_exe_file looking for L"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll"
0036:trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows;C:\\windows\\system32\\wbem"' for
'L"del"'
0036:trace:cmd:WCMD_run_program Found as L"C:\\windows\\del.*"
0036:trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\del.*"
0036:trace:cmd:WCMD_run_program Found as L"C:\\windows\\del.*"
0036:trace:cmd:WCMD_run_program ASSUMING INTERNAL
0036:trace:process:CreateProcessW app (null) cmdline L"del /F /Q
C:\\windows\\system32\\WindowsPowerShell\\v1.0\\Microsoft.PowerShell.ConsoleHost.dll"
...
0036:trace:process:CreateProcessW starting L"C:\\windows\\system32\\del.exe" as
32-bit Winelib app
...
wine: cannot find L"C:\\windows\\system32\\del.exe"
File not found
--- snip ---
The enclosing quoting of builtin command line and parameters confuses cmd.exe.
This works:
--- snip ---
$ wine cmd.exe /c del /F /Q "foo.txt"
--- snip ---
This does not (but should):
--- snip ---
$ wine cmd.exe /c "del /F /Q "foo.txt""
--- snip ---
Regards
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
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