Convert a .com to a .exe ? - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Convert a .com to a .exe ?

BillBill Posts: 0Member

I have several legacy command codes (progname.com) which cannot be run under Windows 7. If I could convert them to executable equivalents (progname.exe), I could continue to use them. I believe there were conversion programs that could convert a .com file to a .exe file years ago. Can anyone tell me where how I might get one ?

Comments

  • OceanJeff40OceanJeff40 Posts: 9Member

    seems to me you could just google for an .exe to do the same thing the .com did...? what are the utilities? probably free. you can always try the debug.com, and put together an x86 assembly code from that (if small program, or if you have a lot of time on your hands and know what you're doing, if it's large...?!) and then re-assemble as an .exe. So I guess it depends on what the .com programs are, and what are they used to do, and how large are they?

  • OceanJeff40OceanJeff40 Posts: 9Member

    Oops, I just tried debug, and forgot it's only for x86 computers, I have an 64-bit CPU, this might mess things up a bit.

  • Polda18Polda18 Czech RepublicPosts: 3Member

    COM files are actualy working under Windows 7 (32bit), but it opens DOS command prompt windows that has restricted functions. It does not support software-solved screen changing (which is basic function in MS-DOS and other DOS-like operating systems, but not in Windows). It supports only default screen that can be viewed only in a window actualy, which is text mode only (it displays graphics using ASCII chars). This means you can't run old DOS games or programs that are using real graphic options (drawing a line, painting in the screen) - you can use only programs that load up in default text mode (such as Telnet or default DOS text editor). Converting them to EXE won't help you much as it will be still DOS application and will have the same restricted rules as COM ones. I could suggest you to give DOSBox a try or install and set up a virtual machine - then download DOS and install it in the VM. Set up shared folders, if possible and move your DOS apps there. Launch VM, go to the shared folder and you can use these apps as they would act like on physical computer with DOS installed. Remember that VM is present in memory under the Windows so it will be a little slower than it would be on a physical PC.

    If you want to convert DOS app to normal Win32 application - it won't work. You can use DOS apps in Windows if you check the restriction DOS in W7 has, but you can't convert DOS app to regular Win32 app as it hasn't been designed to be used under Windows and might cause errors. Also Win32 apps are not workin under DOS, so you can't then use converted app in the DOS again... Now you have Win32 application that crashes both in Windows and DOS and it is useless.

Sign In or Register to comment.