I have an executable program (no source code, just the compiled executable) that was made in windows (.exe extension). It doesn't use any graphics... it simply reads and writes files. I want to be able to run it in a linux shell script so that I don't have to switch operating systems to get my output. Is there a way to use or convert the executable for linux operating systems?
3 Answers
Wine works even for Windows CLI apps.
-
-
1
-
-
-
You can't run Windows binaries (source compiled to run in Windows) on Linux without going through a Windows emulator of some sort.
So if you don't want to run Windows in a virtual machine, or you don't want to run Wine or anything similar, sorry, but it won't run on Linux.
-
I don't really need most of the features of a virtual windows environment (i.e. graphics, etc)... is there a way to get an emulator just for the windows DOS command prompt? That is really all that I'll need to run the program.– PaulMay 3, 2012 at 0:02
-
1
-
1
Beside wine, as already suggested, a virtual machine like VMware-Player is fine to execute Windows programs, without rebooting.
Jar-files and some mono-applications will not need Wine or a Windows, running in a VM, but we wouldn't call that Windows executable.
A windows-executable, which runs in the shell, is most of the time still a windows executable, and won't run on DOS. Don't let the user interface fool you! They will report 'This program will not run in DOS-mode' or similar.
-
Regarding running CLI win32 executables, from a real Free-DOS/MS-DOS, it can be done, although some limitations do apply. Specifically check out HXDOS japheth.de/HX.html, it also includes a utility named PatchPE, which will convert binaries from Win32-PE to DOS-PE. Jun 11, 2013 at 14:44