chenloong Posted June 7, 2007 Share Posted June 7, 2007 Hi to everyone, I am a newbie to this forum, hope that any expert can help to solve my problem.... My problem is, as stated, how i want to run a windows .exe in Linux Environment? I has a task, which require to use a windows .exe to generate a result file, and until now, i has success on generate the result file (i do it on windows XP environment using command prompt). Now, i want to embed this functionality (i.e generate result file) into my website. I am using php, and i think there should be no problem if the environment is Windows Server 2003 or others windows server environment (just using exec() provided in php will work, correct me if i am wrong). But unfortunately, i am using Linux as OS environment. As a result, i don't have any idea to run this .exe on Linux. I think, the worst solution is to change the php environment to Windows base in stead of Linux base. Or perhaps deploy some application like WINE, to run windows application in Linux environment. But neither one is a good solution, the 1st is to troublesome, 2nd is not really consistent in running windows application. Regards, chenloong Quote Link to comment https://forums.phpfreaks.com/topic/54528-solved-how-to-run-windows-exe-in-linux-environment/ Share on other sites More sharing options...
trq Posted June 7, 2007 Share Posted June 7, 2007 This really has nothing to do with php, but anyway. The only way you can run exe files within Linux is through wine. You really need to explain more about what this exe actually does. You say it generates a result file.... the result of what? Would this same result even exist on a deferent machine? It may simply be easier to port this exe to Linux, but we'd need to know what it does. Quote Link to comment https://forums.phpfreaks.com/topic/54528-solved-how-to-run-windows-exe-in-linux-environment/#findComment-269756 Share on other sites More sharing options...
neel_basu Posted June 7, 2007 Share Posted June 7, 2007 Sometimes wine cant run exe files but sometimes it can. According to your description your programm is a CLI programm(DOS based). I dont think Wine can handle it. If teh programm is made by C or C++ compile its source code in Linux Environment With Gcc and then use that executable File. Quote Link to comment https://forums.phpfreaks.com/topic/54528-solved-how-to-run-windows-exe-in-linux-environment/#findComment-269850 Share on other sites More sharing options...
chenloong Posted June 8, 2007 Author Share Posted June 8, 2007 ya, i agree with neel_basu, and my program is DOS based. Since wine not help much on this, i decided to make it on windows environment. And it works! Thanks for sharing valuable info with me. Regards chenloong Quote Link to comment https://forums.phpfreaks.com/topic/54528-solved-how-to-run-windows-exe-in-linux-environment/#findComment-270620 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.