How to run exe file on Linux

Whether you are using Linux on the desktop or as a server, it's still good that you're using Linux. Linux related questions go here.

Moderator: General Moderators

Post Reply
antoniobanjeras
Forum Newbie
Posts: 10
Joined: Mon Aug 04, 2008 11:13 pm

How to run exe file on Linux

Post by antoniobanjeras »

hi,

i am writing php on Linux. i have a program called ReadParam.exe. i need to run this program to read values (param) from thumbdrive.

i've tried smthg like this, but it's not working:-

$cmd = "ReadParam.exe";
$output = exec($cmd);
echo $output;

is the command correct? how the check the output? pls help.
taylor28
Forum Commoner
Posts: 31
Joined: Tue Sep 16, 2008 11:55 pm

Re: How to run exe file on Linux

Post by taylor28 »

They say that .exe will not run in Linux it is not compatible and I have tried it and I failed to run it.
Hannes2k
Forum Contributor
Posts: 102
Joined: Fri Oct 24, 2008 12:22 pm

Re: How to run exe file on Linux

Post by Hannes2k »

Hi,
for running .exe files under linux, you have to use a windows emulation tool like Wine, because .exe is just for windows.

The much better solution would be to compile the source code of your 'ReadParam' program under linux and then run this instead using wine for trying to run the .exe file ;)
taylor28
Forum Commoner
Posts: 31
Joined: Tue Sep 16, 2008 11:55 pm

Re: How to run exe file on Linux

Post by taylor28 »

Well I have tried it but its not compatible with my ubuntu its not supported any more. :cry:
Post Reply