Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm running Quantal 32-bit with Wine 1.4.1 installed. I have a particular .exe file of an old game (Aliens vs Predator Gold Edition) that runs flawlessly, but it refuses to run unless I am in its exact directory.

For example, if in terminal I cd to the game's directory and run wine avp.exe, it launches with no problem. It also launches fine when I right-click and choose to run with Wine Windows Program Loader.

However, if I'm in another directory in terminal, say my home directory, and I try to launch it by calling it's absolute file path, i.e.

wine /home/USER/.wine/drive_c/AVP/avp.exe

it fails to launch and gives me an error message saying that it encountered a "serious problem and needs to close".

I have no idea why calling this program from another directory would make any difference, especially since I've successfully executed other exe files this way. Has anyone encountered this before?

share|improve this question
    
Just wondering, is that the complete path to the executable? and can you quote the path to see if it works? Like wine "/home/USER/.wine/drive_c/AVP/avp.exe" I would also encourage you to upgrade wine from the 1.4.1 version to the 1.5.x version using the PPA provided for it in the winehq site. There were many bugs back then and it might fix the path issue if you upgrade. –  Luis Alvarado Apr 16 '13 at 22:11
    
You just need a script or icon to run the game. Any yes, most 'older' Windows-based software needs to be in the 'home' directory for that app. to run properly. –  david6 Apr 16 '13 at 23:25
    
Thanks for the replies. To answer Luis' question, I did try enclosing the complete path name to the the executable with no luck. It appears that wine finds the program but just can't run it. It also seems that it doesn't matter where the folder containing the executable is located; as long as I'm in its directory, I can launch it. I will follow your advice and upgrade wine to 1.5.x and see if that fixes the issue. Worst case scenario is that I'll just have to navigate to the directory and launch it from there whenever I want to play it. –  Skreechbat Apr 17 '13 at 0:52
    
In response to david6, how would I go about creating a script or icon to run the game? I first noticed the problem when I attempted to create a custom launcher (.desktop file) with the command "wine /path/to/game/avp.exe". Not sure if that's the same thing as a script or icon? –  Skreechbat Apr 17 '13 at 0:56
add comment

1 Answer

The program probably uses dlls which it can only find when run from its directory, where they reside. This is a common mistake Windows programmers make.

share|improve this answer
    
Am going to +1 because yes, this would also happen in a Windows environment. That is why so apps run a "launcher" first. –  Luis Alvarado Apr 16 '13 at 22:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.