Wednesday, March 26, 2008

Command.com vs cmd.exe

Windows NT/Windows 2000 supply cmd.exe and command.com. CMD.EXE is the Windows NT command line interface, its NOT a DOS window. COMMAND.COM is a 16-bit DOS application which is used for older DOS compatibility and actually runs inside the NTVDM (NT Virtual DOS Machine) due to its 16-bit nature.

What may surprise you is the face that COMMAND.COM and CMD.EXE have almost identical features and this is because any command entered in COMMAND.COM it is packaged up and sent to CMD.EXE for execution and thanks to this COMMAND.COM can take advantage of all the functions and facilities of CMD.EXE. This is possible as the version of COMMAND.COM shipped with NT IS a special NT version designed to pass all execution to CMD.EXE.

If you had Task Manager running you would actually see a CMD.EXE process started when executing commands in COMMAND.COM.