https://bugs.winehq.org/show_bug.cgi?id=37789
Bug ID: 37789 Summary: cmd.exe /c cannot handle "(" and ")" characters in a full script path name Product: Wine Version: 1.7.33 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: cmd Assignee: wine-bugs@winehq.org Reporter: abolte@systemsaviour.com Distribution: ---
Created attachment 50334 --> https://bugs.winehq.org/attachment.cgi?id=50334 Various cmd executions discussed in the report using WINEDEBUG='+cmd'.
Far Cry 4 (which requires at least a 64-bit Windows 7 prefix) fails to call a bash script on launch:
Can't recognise 'C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\GEFirewall.bat /silent' as an internal or external command, or batch script.
Sure enough, calling it manually (even without the /silent argument) results in the same error: $ wine cmd.exe /c 'C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\GEFirewall.bat' Can't recognise 'C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\GEFirewall.bat' as an internal or external command, or batch script.
Suspicious of the ( and ) characters in the URL, I tried copying the GEFirewall.bat to the path 'C:\Program Files\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software' (which doesn't normally exist but I manually created it).
$ wine cmd.exe /c 'C:\Program Files\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\GEFirewall.bat' fixme:netsh:wmain stub: L"netsh" L"firewall" L"add" L"allowedprogram" L"C:\Program Files\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\..\..\bin\FarCry4.exe" L"FarCry4" L"ENABLE" fixme:netsh:wmain stub: L"netsh" L"firewall" L"add" L"allowedprogram" L"C:\Program Files\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software\..\..\bin\IGE_WPF64.exe" L"FarCry4-IGE" L"ENABLE"
The script ran perfectly.
One more test to confirm my sanity:
$ wine explorer.exe 'C:\Program Files (x86)\Ubisoft\Ubisoft Game Launcher\games\Far Cry 4\Support\Software'
This opened the directory in explorer fine. Only cmd.exe /c ... seems to show this issue.