[Bug 23319] New: cmd thinks shift.exe is an internal command
http://bugs.winehq.org/show_bug.cgi?id=23319 Summary: cmd thinks shift.exe is an internal command Product: Wine Version: 1.2-rc4 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: programs AssignedTo: wine-bugs(a)winehq.org ReportedBy: dank(a)kegel.com On Windows, 'shift' is an internal command, and 'shift.exe' is an external command. Wine's cmd mistakenly thinks 'shift.exe' is a synonym for 'shift'. This makes it somewhat hard to play EA's Need For Speed: Shift. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 --- Comment #1 from Dan Kegel <dank(a)kegel.com> 2010-06-22 13:38:47 --- Forgot to mention: wine's cmd does properly recognize .\shift.exe as external. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 Jason Edmeades <us(a)edmeades.me.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |us(a)edmeades.me.uk --- Comment #2 from Jason Edmeades <us(a)edmeades.me.uk> 2010-06-24 09:30:07 --- Interesting testing this with procmon... If the first token is not followed by a whitespace, it will attempt to open a program with that name in the current working directory, then it will check for internal programs with that name,... for example: shift - doesnt look at local file system shift.exe - looks for 'shift.exe' locally, then matches 'shift' internal cd - doesnt look at local file system cd.exe - looks for 'cd.exe' in local dir, then matches 'cd' internal command with parameter ".exe" (eg. mk .exe, cd.exe) fred.exe - searches current dir for fred.exe then goes off on locate searching (eg. for fred.exe.* locally, then searching the path) So overall, if we match the internal command, and the next token is a not a whitespace, see if there is a <first token> file in the current directory, and if there is then run it otherwise drop into the internal command processind -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|programs |cmd --- Comment #3 from Dan Kegel <dank(a)kegel.com> 2011-06-01 22:56:55 CDT --- Per Alexandre, Wine policy is to not use procmon to trace execution through Microsoft code. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 Vijay Kamuju <infyquest(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest(a)gmail.com --- Comment #4 from Vijay Kamuju <infyquest(a)gmail.com> 2011-09-09 15:36:33 CDT --- how should we deal with this bug??? -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 --- Comment #5 from Dan Kegel <dank(a)kegel.com> 2011-09-09 15:39:12 CDT --- We need to write some tests to see how native behaves. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 Frédéric Delanoy <frederic.delanoy(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic.delanoy(a)gmail.com --- Comment #6 from Frédéric Delanoy <frederic.delanoy(a)gmail.com> 2011-09-17 10:49:01 CDT --- (In reply to comment #5)
We need to write some tests to see how native behaves.
Not sure how to integrate that into cmd test suite, but I made some (manual) tests. On windows (2k), external shift.exe is recognized/executed *only* if it's present in the current directory. Being in a directory belonging to the path does not change anything. -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 --- Comment #7 from Frédéric Delanoy <frederic.delanoy(a)gmail.com> 2012-10-26 16:30:39 CDT --- Still in 1.5.16 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download --- Comment #8 from Austin English <austinenglish(a)gmail.com> --- Z:\home\austin>shift Z:\home\austin>shift.exe Z:\home\austin>.\shift.exe Can't recognize '.\shift.exe' as an internal or external command, or batch script. still in 1.7.37. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 winetest(a)luukku.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |00cpxxx(a)gmail.com, | |winetest(a)luukku.com --- Comment #9 from winetest(a)luukku.com --- wine cmd then writing shift (enter) and shift.exe (enter) outputs nothing... Is this expected/fixed? -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 --- Comment #10 from winetest(a)luukku.com --- (In reply to winetest from comment #9)
wine cmd
then writing
shift (enter) and shift.exe (enter)
outputs nothing...
Is this expected/fixed?
I didnt notice that there was 3rd comamnd .\shift.exe Can't recognize '.\shift.exe' as an internal or external command, or batch script. still valid wine 1.9.24. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 exposight <exposight(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |exposight(a)gmail.com --- Comment #11 from exposight <exposight(a)gmail.com> --- Still same behavior in wine 4.18 -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 Janne <janne.kekkonen(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |janne.kekkonen(a)gmail.com --- Comment #12 from Janne <janne.kekkonen(a)gmail.com> --- Tested with wine 9.0 I created hello world application and named it to shift.exe. First i started cmd with: wine cmd Commands given: 1: C:\temp\bug-23319>shift /? SHIFT is used in a batch file to remove one parameter from the head of the list, so parameter 2 becomes parameter 1 and so on. It has no effect if called from the command line. 2: C:\temp\bug-23319>shift.exe /? 3: C:\temp\bug-23319>./shift.exe /? Hello World Notes: Second command didn't output anything. In Windows 11: shift.exe /? Started the hello world application. -- 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.
https://bugs.winehq.org/show_bug.cgi?id=23319 Janne <janne.kekkonen(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC|janne.kekkonen(a)gmail.com | -- 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.
http://bugs.winehq.org/show_bug.cgi?id=23319 --- Comment #13 from Janne <janne.kekkonen(a)gmail.com> --- Tested with Wine10.19 on Ubuntu 22.04 running on VMWare. Seems that shift.exe is not interpret as internal command anymore. Seems that functionality of shift /? has changed. To get help for shift help command is needed. Log:
wine --version wine-10.19 WINEPREFIX=~/npp_tst WINEARCH=win64 wine cmd Microsoft Windows 10.0.19045
C:\temp>shift C:\temp>shift /? HELP <command> shows brief help details on a topic. HELP without an argument shows all CMD built-in commands. C:\temp>help shift SHIFT is used in a batch file to remove one parameter from the head of the list, so parameter 2 becomes parameter 1 and so on. It has no effect if called from the command line. C:\temp>shift.exe Hello World C:\temp>shift.exe /? Hello World C:\temp>./shift.exe /? Hello World C:\temp>.\shift.exe Hello World C:\temp>.\shift.exe /? Hello World C:\temp> -- 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.
participants (2)
-
wine-bugs@winehq.org -
WineHQ Bugzilla