Windows command-line interface::MS-DOS


MS-DOS::windows    Version::version    Versions::system    Title::systems    Which::released    Hardware::first

Windows command-line interface All versions of Microsoft Windows have had an MS-DOS like command-line interface (CLI). This could run many DOS and variously Win32, OS/2 1.x and POSIX command line utilities in the same command-line session, allowing piping between commands. The user interface, and the icon up to Windows 2000, followed the native MS-DOS interface.

The 16-bit versions of Windows (up to 3.11) ran as a Graphical User Interface (GUI) on top of MS-DOS. With Windows 95, 98, 98 SE and ME, the MS-DOS part was (superficially) integrated, treating both operating systems as a complete package, though the DOS component could actually stand alone. The command line accessed the DOS command line (usually COMMAND.COM), through a Windows module (WINOLDAP.MOD){{ safesubst:#invoke:Unsubst||$N=Clarify |date=__DATE__ |$B= }}.

A new line of Windows, (Windows NT), boot through a kernel whose sole purpose is to load Windows. One can not run Win32 applications in the loader system in the manner that OS/2, UNIX or Consumer Windows can launch character mode sessions.

The command session permits running of various supported command line utilities from Win32, MS-DOS, OS/2 1.x and POSIX. The emulators for MS-DOS, OS/2 and POSIX use the host's window in the same way that Win16 applications use the Win32 explorer. Using the host's window allows one to pipe output between emulations.

The MS-DOS emulation is done through the NTVDM (NT Virtual DOS Machine). This is a modified SoftPC (a former product similar to VirtualPC), running a modified MS-DOS 5 (NTIO.SYS and NTDOS.SYS). The output is handled by the console DLLs, so that the program at the prompt (CMD.EXE, 4NT.EXE, TCC.EXE), can see the output. 64-bit Windows does not have either the DOS emulation, or the DOS commands (EDIT, DEBUG, EDLIN), that come with 32-bit Windows.

The DOS version returns 5.00 or 5.50, depending on which API function is used to determine it. Utilities from MS-DOS 5.00 run in this emulation without modification. The very early beta programs of NT show MS-DOS 30.00, but programs running in MS-DOS 30.00 would assume that OS/2 was in control.

The OS/2 emulation is handled through OS2SS.EXE and OS2.EXE, and DOSCALLS.DLL. OS2.EXE is a version of the OS/2 shell (CMD.EXE), which passes commands down to the OS2SS.EXE, and input-output to the Windows NT shell. Windows 2000 was the last version of NT to support OS/2. The emulation is OS/2 1.30.

POSIX is emulated through the POSIX shell, but no emulated shell: the commands are handled directly in CMD.EXE.

The Command Prompt is often called the MS-DOS prompt. In part, this was the official name for it in Windows 9x and early versions of Windows NT (NT 3.5 and earlier), and in part because the SoftPC emulation of DOS redirects output into it. Actually only COMMAND.COM and other 16bit commands run in a NTVDM with AUTOEXEC.NT and CONFIG.NT initialisation determined by _default.pif, optionally permitting the use of Win32 console applications and internal commands with a NTCMDPROMPT directive.

Win32 console applications use CMD.EXE as their command prompt shell. This confusion does not exist under OS/2 because there are separate DOS and OS/2 prompts, and running a DOS program under OS/2 will launch a separate DOS window to run the application.

All versions of Windows for x86-64 and Itanium architectures no longer include the NTVDM and can therefore no longer natively run MS-DOS or 16-bit Windows applications. There are alternatives in the form of Virtual machine emulators such as Microsoft's own Virtual PC, as well as VMware, DOSBox, and others.

MS-DOS sections
Intro  History  [[MS-DOS?section={{safesubst:#invoke:anchor|main}}Versions|{{safesubst:#invoke:anchor|main}}Versions]]  Competition  Legal issues  Use of undocumented APIs  End of MS-DOS  Windows command-line interface  Legacy compatibility  Related systems  Physical RAM limit  Physical hard disk drive limit  See also  References  External links  

Windows command-line interface
PREVIOUS: End of MS-DOSNEXT: Legacy compatibility