https://bugs.winehq.org/show_bug.cgi?id=34730
--- Comment #24 from Emmanuel Charpentier emm.charpentier@free.fr --- (In reply to Alexandre Julliard from comment #23)
(In reply to Emmanuel Charpentier from comment #22)
Maybe we should have an utility calling the system (Linux) shell and associate it with, for example the ".SH" exytension ? This would allow to create specific or generic shells invoking whatever Linux progfram we wish and communicate its outputs to Wine ?
If your script ends in .exe, you should be able to run it directly from the command line.
Nope, as exemplified below [my comments between brackets] :
charpent@asus16-ec:~$ ls -l .wine/drive_c/windows/system32/evince.exe lrwxrwxrwx 1 charpent charpent 15 Dec 27 17:13 .wine/drive_c/windows/system32/evince.exe -> /usr/bin/evince [ This is a symplink to the unix executable... ]
charpent@asus16-ec:~$ ls -l .wine/drive_c/windows/system32/native.exe -rwxr-xr-x 1 charpent charpent 21 Dec 27 14:30 .wine/drive_c/windows/system32/native.exe charpent@asus16-ec:~$ cat .wine/drive_c/windows/system32/native.exe #!/bin/bash ${@:1} [ This is a shell script as suggested somewhere in the bug's discussion )
[ Let's try to use the symlink ] charpent@asus16-ec:~$ wine evince wine: Bad EXE format for C:\windows\system32\evince.exe. [ No such luck ... ]
charpent@asus16-ec:~$ wine C:\windows\system32\evince.exe wine: Bad EXE format for C:\windows\system32\evince.exe. [ It's not the path either : ]
[ Let's try the shell script ] charpent@asus16-ec:~$ wine native ls -l wine: Bad EXE format for C:\windows\system32\native.exe. [ Nope. Let's check it's not a path problem : ] charpent@asus16-ec:~$ wine C:\windows\system32\native.exe ls -l wine: Bad EXE format for C:\windows\system32\native.exe. [ No such luck. ]
[ Check it again in a CMD.EXE session : ] charpent@asus16-ec:~$ wine cmd Microsoft Windows 5.1.2600 (1.8-rc4)
Z:\home\charpent>evince Can't recognize 'evince' as an internal or external command, or batch script.
Z:\home\charpent>native ls -l Can't recognize 'native ls -l' as an internal or external command, or batch script.
[ Check for path problems : ] Z:\home\charpent>C:\windows\system32\evince.exe Can't recognize 'C:\windows\system32\evince.exe' as an internal or external command, or batch script.
Z:\home\charpent>C:\windows\system32\native.exe ls -l Can't recognize 'C:\windows\system32\native.exe ls -l' as an internal or external command, or batch script.
[ Not a path problem. I give up... ]
Z:\home\charpent>exit
If it ends in .sh, you have to add ".sh" to PATHEXT, and then it should run fine.
Nope :
charpent@asus16-ec:~$ mv .wine/drive_c/windows/system32/native.exe .wine/drive_c/windows/system32/native.sh charpent@asus16-ec:~$ wine cmd Microsoft Windows 5.1.2600 (1.8-rc4)
Z:\home\charpent>set PATHEXT=.SH;%PATHEXT%
Z:\home\charpent>echo %PATHEXT% .SH;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
Z:\home\charpent>native ls -l Can't recognize 'native ls -l' as an internal or external command, or batch script.
Z:\home\charpent>exit
If it has no extension, adding "." to PATHEXT should have the same result.
Nome :
charpent@asus16-ec:~$ mv .wine/drive_c/windows/system32/evince.exe .wine/drive_c/windows/system32/evince charpent@asus16-ec:~$ wine cmd Microsoft Windows 5.1.2600 (1.8-rc4)
Z:\home\charpent>set PATHEXT=.;%PATHEXT%
Z:\home\charpent>echo %PATHEXT% .;.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
Z:\home\charpent>evince Can't recognize 'evince' as an internal or external command, or batch script.
Z:\home\charpent>exit
As far as I can tell, this is exactly how Windows behaves. Do you see a different behavior?
Note: start /unix uses a different code path, and probably behaves differently. This should be a separate bug, this bug is about cmd.
Okay. Let's keep it simple and focused on CMD.
It still does NOT work as advertized i the FAQ § 7.4...
HTH,