Page 1 of 1

How to run exe file on Linux

Posted: Mon Oct 27, 2008 9:11 pm
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.

Re: How to run exe file on Linux

Posted: Tue Oct 28, 2008 2:17 am
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.

Re: How to run exe file on Linux

Posted: Tue Oct 28, 2008 2:59 pm
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 ;)

Re: How to run exe file on Linux

Posted: Fri Oct 31, 2008 1:53 am
by taylor28
Well I have tried it but its not compatible with my ubuntu its not supported any more. :cry: