KAndle Consulting

17 1/2 Palisado Ave
Windsor, CT 06095

phone: 860.882.6763 KAndle@KAndleConsulting.com

*KAndle Consulting is not affiliated with Candle Corporation in any way.

Home : Tutorials : Command Prompt : Command Prompt vs. DOS

Differences between the Windows XP command prompt or CMD.exe and DOS or Disk Operating System.

Why won't my DOS program work in Windows XP?  XP won't run my DOS application.

Windows XP and DOS have one thing in common.  They are both operating systems.  You pretty much needed DOS to run your Intel-based computer before Windows 95 was released.  You didn't actually need Windows to use your computer like you do now.  DOS interfaced with the computer hardware through drivers that talked directly to each device installed. (Sound cards, modems, network cards, etc...)   We had to set the memory addresses & IRQ's for these devices to unused settings using jumpers on the computer board.  In the old days most DOS drivers were manually configured as well.  You had to set the driver to use the addresses you jumpered.   Windows XP mostly manages the hardware & drivers these days.

To run most games in DOS, you had to place the drivers in special memory locations to maximize the available memory.  This often required a specially configured boot-up floppy disk to bypass the settings you would normally use to run non-game applications or more importantly to run Windows.  On some computers it was quite a task to free enough conventional memory to run Windows 3.1.  Windows 95 changed all this but before that DOS was required to initialize your computer, manage drivers & to load Windows.  Blah Blah

Why do you care?  Well certain DOS programs are only written to interface with DOS drivers.  Windows XP has a hard time using many DOS drivers.  Most programs that use DOS drivers have a hard time using Windows XP drivers.  It is not hopeless though.  There are ways around most of these limitations but some of them are more complicated than others.

Today some Windows XP applications & programs are text-based.  These means they are invoked from Run command in the Start menu directly or invoked from the command line in a cmd.exe window.  This also means these programs are written for Windows XP & utilize Windows XP drivers just without flashy graphics and drop-downs. Instead these Win32 programs utilize variables and switches like DOS-based program often did.  Win32 means the program is a 32-bit program, DOS programs are 16-bit programs.  Anyway variables and switches allow scripts to be written to help automate repetitive tasks.

That isn't the only reason to use scripts and variables though. Sometimes running a graphical Windows application from the command prompt using a switch instead of invoking it directly from the Start Menu will disable or enable features of that application.  Not to confuse the subject but this is a reason some people choose Linux over Windows.  Many more things are done from a command prompt in Linux and many people like the control it offers.  More on switches in a minute.

Script files and batch files

Imagine a movie script.  A good script describes everything that happens.  Things in the background, what the actors are doing and saying, even what they are wearing.  A Windows computer script (or in DOS a batch file) is simply a list of commands that describe exactly what should be happening.  A computer script may also contain variables which help the script decide the proper actions to take on each computer the script is "delivered" to.  It's almost like how a movie script has different lines for different people.  Each person only needs to recite their own lines.  When multiple computers run a single script each computer processes only the lines that apply to it.  Variables help a computer identify the lines in the script it should read or process. 

Switches and command line variables

Using switches to run a program or application is like having the Director's Cut of a movie.  Except you get to decide which parts to include in each showing and which parts to keep out.  You might use a switch to tell a program what kind of sound card or video card you have in your computer.  A program may support 10 different video chipsets and the program might need you to tell it what kind of video card you have in your computer instead of auto detecting it. A switch is one way of accomplishing this. You can sometime use a command line switch to set override default settings and to perform administrative tasks.

This document is a work in progress...

site design: kendude.com
"));