How to Run DOS Prompt in Windows 8

Introduction

 
To run a DOS application in Windows 8 requires a little bit of trick. It's not as simple as to just double-click on the program and use it. But many of you are thinking that whoever will use a 16-bit program or DOS Application nowadays.
 
But there are some tools and applications that are only supported in DOS or the operating systems until Windows XP. For example, as I am the Computer Science Student then I have used Turbo C Tool which is supported in DOS mode (there is an alternative for this tool as well but I love to use this). To run a DOS Application in Windows 8 we need a third-party tool, called an emulator. The DosBox is a famous tool that helps us to run a DOS Application in Windows 8. DosBox is an open-source tool and is lightweight to install. DosBox is capable of running most DOS applications inside its environment. Here follow the link to download it and don't worry; it is safe to use.
To run the DOS Prompt, Download the Latest A version of DosBox.
 
Now once downloaded just install it and I don't think you need to do any installation. After installing the application the icon will be on your Desktop. Just double-click on that and the DosBox will open on your computer.
 
Windows8-VMware-player.gif
 
You are now in the DosBox shell. Note that it automatically puts you at the Z:\ drive; we want to change that. Try typing in the DOS command C. Note that it says the drive doesn't exist. We could mount the C drive every time we open the DosBox by typing mount c /home/yourname/dosprog every-time.
 
DOSBox-in-windows8.gif
 
But why do that when DosBox can create a configuration file to take care of that for you! But first, we need to create the file. At the DosBox Z:\ prompt, type in:
config -writeconf /home/yourname/dosbox.conf.
 
You now have the configuration file.
  
Type: exit
 
This puts you back in your terminal session.
 
Type: sudo gedit dosbox.conf.
 
This will open the DosBox configuration file. Scroll down the dosbox.conf file to this section: [autoexec].
 
# Lines in this section will be run at startup.
 
Type: mount c /home/yourname/dosprog
 
This will automatically mount the C: drive to your dosprog directory.
 
If you want DosBox to automatically start on the C: drive. Enter C: on a new line after your mount line.
 

Save and quit gedit

 
Now at the terminal prompt, type in DosBox; it should automount the C: drive (and if you followed step 8a, it will also start you on the C: drive).
 

Manually Mounting a CD-ROM

 
Place a CD in your CD-ROM. Ubuntu will happily auto-mount the CD for you to /media/cdrom0 assuming that you placed teh CD in that drive. If you have more than one CD-ROM drive Ubuntu will have mounted it to /media/cdromx where x is a number. Now that we're done with that OS stuff back to DosBox.
  
Type: mount d /media/cdrom0 -t cdrom.
 
Now your CD is mounted in DosBox to the D: drive. Again if you'd like to test this.
 
Type: D: and press enter.
  
Now type dir and press enter. You should again get a listing of all items on the CD.
 

Now we will create a c++ program in the editor and will take output in the DOS Prompt

 
DOS-prompt-in-windows8.gif
 
DOSBox-prompt-2-in-windows8.gif
 
 

Summary 

 
In this article, we learned about How to Run DOS Prompt in Windows 8.


Similar Articles