https://bugs.winehq.org/show_bug.cgi?id=48130
--- Comment #2 from RDL soft-sonic@yandex.ru --- It seems that wine is resetting the CurrentDirectory parameter. I wrote the simplest lazarus program that runs an executable file in the specified folder.
AProcess: = TProcess.Create (nil); AProcess.CurrentDirectory: = 'Z:\run\media\administrator\16d07e87-2a85-4576-8168-232fdf98cbb7\Games\World_of_Tanks'; AProcess.Executable:='WoTLauncher.exe'; AProcess.Execute; AProcess.Free;
If I run it with this command wine myprogramm.exe then nothing happens because WoTLauncher.exe is not found. although in code programs shows the working directory.
if I run like this: cd '/run/media/administrator/16d07e87-2a85-4576-8168-232fdf98cbb7/Games/ World_of_Tanks' wine myprogramm.exe the program is running.
If you create a bash script with this content #! / Bin / bash export WINEPREFIX = "/ home / administrator / Wine / WoT" cd '/ run / media / administrator / 16d07e87-2a85-4576-8168-232fdf98cbb7 / Games / World_of_Tanks /' wine 'WoTLauncher.exe'
and create a shortcut using xfce for this script. Then by clicking on this shortcut WoTLauncher.exe starts, but the game itself will crash.
Wine resets the working directory at startup. Even if it is specified explicitly in the code.