cmd /c "c: && echo 1" File not found

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
leniviy
Level 2
Level 2
Posts: 39
Joined: Sat Jun 27, 2009 3:19 pm

cmd /c "c: && echo 1" File not found

Post by leniviy »

Code: Select all

[il@IL ~]$ wine cmd /c "c: && echo 1"
File not found

1
does anyone get the same error? Is it a known bug?
Gert van den Berg

cmd /c "c: && echo 1" File not found

Post by Gert van den Berg »

On Thu, Mar 4, 2010 at 20:27, leniviy <[email protected]> wrote:
does anyone get the same error? Is it a known bug?
Confirmed for me on wine 1.1.38. It disappears if you remove the
space. This does not happen under XP x64, so it should be a bug.

cmd /c "c: && dir" confirms that the c: does not execute.

Gert
Gert van den Berg

cmd /c "c: && echo 1" File not found

Post by Gert van den Berg »

On Thu, Mar 4, 2010 at 20:46, Gert van den Berg <[email protected]> wrote:
cmd /c "c: && dir" confirms that the c: does not execute.
In addition, the second command still runs, which is not expected with
a "&&" if the first command fails.
Gert van den Berg

cmd /c "c: && echo 1" File not found

Post by Gert van den Berg »

On Thu, Mar 4, 2010 at 20:49, Gert van den Berg wrote:
On Thu, Mar 4, 2010 at 20:46, Gert van den Berg wrote:
cmd /c "c: && dir" confirms that the c: does not execute.
In addition, the second command still runs, which is not expected with
a "&&" if the first command fails.
Minimal failure case:
mohag@mohagpc:~$ wine cmd /c "c: "
File not found

mohag@mohagpc:~$ wine cmd /c "c:"
mohag@mohagpc:~$

Gert
Gert van den Berg

cmd /c "c: && echo 1" File not found

Post by Gert van den Berg »

Traces of an external command vs internal command:
mohag@mohagpc:/multimedia$ WINEDEBUG=cmd wine cmd /c 'cmd '
trace:cmd:wmain Command line parm: 'L"C:\\windows\\system32\\cmd.exe"'
trace:cmd:wmain Command line parm: 'L"/c"'
trace:cmd:wmain /c command line: 'L"\"cmd \""'
trace:cmd:WCMD_DumpCommands Parsed line:
trace:cmd:WCMD_DumpCommands 0x153790 0 00 (nil) L"\"cmd \"" Redir:L""
trace:cmd:WCMD_process_commands Executing command: 'L"\"cmd \""'
trace:cmd:WCMD_execute command on entry:L"\"cmd \"" (0x32f590), with
'(null)'='(null)'
trace:cmd:WCMD_execute Command: 'L"\"cmd \""'
trace:cmd:WCMD_execute param1: L"cmd ", param2: L""
trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows"' for 'L"cmd "'
trace:cmd:WCMD_run_program Found as L"Z:\\multimedia\\cmd .*"
trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\cmd .*"
trace:cmd:WCMD_run_program ASSUMING INTERNAL
trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows"' for 'L"cmd"'
trace:cmd:WCMD_run_program Found as L"Z:\\multimedia\\cmd.*"
trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\cmd.EXE"
trace:cmd:wmain Command line parm: 'L"cmd"'
trace:cmd:wmain Set L"=Z:" to L"Z:\\multimedia"
CMD Version 1.1.38
Z:\multimedia>

mohag@mohagpc:/multimedia$ WINEDEBUG=cmd wine cmd /c 'cmd'
trace:cmd:wmain Command line parm: 'L"C:\\windows\\system32\\cmd.exe"'
trace:cmd:wmain Command line parm: 'L"/c"'
trace:cmd:wmain /c command line: 'L"cmd"'
trace:cmd:WCMD_DumpCommands Parsed line:
trace:cmd:WCMD_DumpCommands 0x153788 0 00 (nil) L"cmd" Redir:L""
trace:cmd:WCMD_process_commands Executing command: 'L"cmd"'
trace:cmd:WCMD_execute command on entry:L"cmd" (0x32f590), with
'(null)'='(null)'
trace:cmd:WCMD_execute Command: 'L"cmd"'
trace:cmd:WCMD_execute param1: L"", param2: L""
trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows"' for 'L"cmd"'
trace:cmd:WCMD_run_program Found as L"Z:\\multimedia\\cmd.*"
trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\cmd.EXE"
trace:cmd:wmain Command line parm: 'L"cmd"'
trace:cmd:wmain Set L"=Z:" to L"Z:\\multimedia"
CMD Version 1.1.38
Z:\multimedia>

mohag@mohagpc:/multimedia$ WINEDEBUG=cmd wine cmd /c 'dir '
trace:cmd:wmain Command line parm: 'L"C:\\windows\\system32\\cmd.exe"'
trace:cmd:wmain Command line parm: 'L"/c"'
trace:cmd:wmain /c command line: 'L"\"dir \""'
trace:cmd:WCMD_DumpCommands Parsed line:
trace:cmd:WCMD_DumpCommands 0x153790 0 00 (nil) L"\"dir \"" Redir:L""
trace:cmd:WCMD_process_commands Executing command: 'L"\"dir \""'
trace:cmd:WCMD_execute command on entry:L"\"dir \"" (0x32f590), with
'(null)'='(null)'
trace:cmd:WCMD_execute Command: 'L"\"dir \""'
trace:cmd:WCMD_execute param1: L"dir ", param2: L""
trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows"' for 'L"dir "'
trace:cmd:WCMD_run_program Found as L"Z:\\multimedia\\dir .*"
trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\dir .*"
trace:cmd:WCMD_run_program ASSUMING INTERNAL
trace:cmd:WCMD_run_program Searching in
'L".;C:\\windows\\system32;C:\\windows"' for 'L"dir"'
trace:cmd:WCMD_run_program Found as L"Z:\\multimedia\\dir.*"
trace:cmd:WCMD_run_program Found as L"C:\\windows\\system32\\dir.*"
trace:cmd:WCMD_run_program ASSUMING INTERNAL
File not found

mohag@mohagpc:/multimedia$ WINEDEBUG=cmd wine cmd /c 'dir'
trace:cmd:wmain Command line parm: 'L"C:\\windows\\system32\\cmd.exe"'
trace:cmd:wmain Command line parm: 'L"/c"'
trace:cmd:wmain /c command line: 'L"dir"'
trace:cmd:WCMD_DumpCommands Parsed line:
trace:cmd:WCMD_DumpCommands 0x153788 0 00 (nil) L"dir" Redir:L""
trace:cmd:WCMD_process_commands Executing command: 'L"dir"'
trace:cmd:WCMD_execute command on entry:L"dir" (0x32f590), with
'(null)'='(null)'
trace:cmd:WCMD_execute Command: 'L"dir"'
trace:cmd:WCMD_execute param1: L"", param2: L""
trace:cmd:WCMD_directory Inserting default '*'
trace:cmd:WCMD_directory Writing volume for 'Z:'
Volume in drive Z is
Volume Serial Number is 0000-0000
<snip>
leniviy
Level 2
Level 2
Posts: 39
Joined: Sat Jun 27, 2009 3:19 pm

Post by leniviy »

so all built in commands like "dir " , "help ", "pushd " etc. don't work
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Post by DanKegel »

User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: cmd /c "c: && echo 1" File not found

Post by DanKegel »

Bug reported fixed, http://bugs.winehq.org/show_bug.cgi?id=21927

Can you try wine from git? Alternately, when wine-1.5.15 comes out, try that.
Locked