Does Windows still rely on MS-DOS?

71

26

I am just about to start an OS course and as an Apple user I am not very familiar with the underlying details of Windows OS. I was wondering, is MS DOS still used with Windows running on top or is ONLY Windows used now as the OS? I was a little confused because I read somewhere that MS-DOS is used for booting but Windows has all other OS capabilities built into it and thus is used for all other OS operations...

rrazd

Posted 2011-08-04T15:07:14.663

Reputation: 841

No, it does not. The last consumer OS that relied on MS-DOS was Windows Me. Windows XP, Vista, 7, and later are all built on the Windows NT architecture. – bwDraco – 2016-10-29T22:35:54.600

The end of this discussion looks interesting.

– user2284570 – 2013-12-17T21:19:56.837

Answers

140

There are two distinct lineages when it comes to Microsoft Windows, and it doesn't help things when people write things about one lineage that they have learned about the other.

  • The DOS+Windows lineage comprises DOS+Windows all versions up to version 3.11, DOS+Windows 95, DOS+Windows 98, and DOS+Windows Millennium Edition. It has Windows layered on top of DOS. Entire books have been written on the subject of this layering, and it is the subject of some contention, not least because a lot of people for a fair while in the early to middle 1990s wanted the world to believe that DOS was gone and Windows was the operating system.

    This is the DOS+Windows bootstrap process.

  • The Windows NT lineage comprises Windows NT 3.x, Windows NT 4.0, Windows NT 5.0 ("Windows 2000"), Windows NT 5.1 ("Windows XP"), Windows NT 5.2 (some editions of Windows XP and "Windows Server 2003"), Windows NT 6.0 ("Windows Vista"), and Windows NT 6.1 ("Windows 7"). It is not layered on top of DOS, works in a completely different way to DOS, and can run DOS applications by dint of an NT Virtual DOS Machine (NTVDM) which is a virtual machine that runs on top of Windows NT rather than the other way around.

    This is the Windows NT 6.x bootstrap process.

What also doesn't help is when people mistakenly talk of a "DOS prompt" in Windows NT, as has even happened in answers here. Aside from the fact that it is command interpreters that prompt, not operating systems, this conflates "DOS" with "textual user interface" and "command interpreter", neither of which are in actuality synonymous with DOS. DOS is a family of operating systems: MS-DOS, PC-DOS, DR-DOS, FreeDOS, OpenDOS, et cetera.

If one has a command prompt window open on Windows NT then one is almost always running CMD, which is Microsoft's default command interpreter supplied in the box and which is an ordinary, textual user interface, Win32 program. There's no "DOS", nor NTVDM. There's just a Win32 program talking to its Win32 console object. And in fact for many TUI programs that one can run on Windows NT, including all of the tools in Microsoft's various Resource Kits, there is still no whiff of DOS anywhere in the picture, because these are all ordinary Win32 programs that perform Win32 console I/O, too.

Ironically, given that Windows NT 3.1 was released in 1993, the Windows NT lineage actually is the not-based-upon-DOS Windows-is-the-operating-system system that all of the people in the middle 1990s were trying to convince the world that DOS+Windows 95 was.

And, eighteen years later, we're still trying to get it through to some people that Windows NT doesn't work like DOS and never has. ☺

Further reading

  • Jonathan de Boyne Pollard (2006). A book list for operating system kernel developers and device driver writers. Frequently Given Answers.
  • Mark E. Russinovich, David A. Solomon, Alex Ionescu (2009). Windows Internals (5th Edition). Microsoft Press. ISBN 9780735625303.
  • Walter Oney (1996). Systems Programming for Windows 95. Microsoft Press. ISBN 1 55615 949 8.
  • Matt Pietrek (November 1995). Windows 95 System Programming Secrets. IDG Books. ISBN 1-56884-318-6.
  • Andrew Schulman (1994). Unauthorized Windows 95. IDG Books Worldwide. ISBN 9781568841694.
  • Matt Pietrek (1993). Windows internals: the implementation of the Windows operating environment. Addison-Wesley. ISBN 9780201622171.
  • Andrew Schulman, David Maxey, Matt Pietrek (1992). Undocumented Windows: A Programmers Guide to Reserved Microsoft Windows Api Functions. Addison-Wesley. ISBN 9780201608342.

JdeBP

Posted 2011-08-04T15:07:14.663

Reputation: 23 855

How to disable all those DOS reserved device aliases like CON, COM1, AUX, NUL in Windows NT ? – Anixx – 2016-09-16T10:43:13.773

@Frank R UNIX filesystem is crap as well as kernel. And the disk names are not related to NT kernel at all. – Anixx – 2016-09-16T10:49:25.927

It appears that your ntworld.com links may be broken. I get redirected to http://www.virginmedia.com/.

– Bacon Bits – 2017-03-28T15:01:48.837

11It only gets better. I'm still teaching people that you can Alt-Tab between applications. . . – surfasb – 2011-08-05T05:08:33.763

2Isn't it true that for Windows 95+, DOS is being used as a bootloader rather then an operating system layer. i.e. Windows 95+ don't invoke DOS services except during the boot process. – Winston Ewert – 2011-08-05T06:11:01.410

3@Winston Ewert, to my knowledge windows programs still relied on dos INT 21h in windows 95. For example, INT 21h function 55h for initialization and INT 21h function 4Ch for termination. I can't answer for 98 and ME. But 95 did. – artifex – 2011-08-05T06:56:15.033

2That's just a calling convention. Thoese calls could end up in the 32 bits disk drivers. – MSalters – 2011-08-05T07:51:21.867

@Winston Ewert DOS is still just something you boot into..with Win9X I think it booted fairly completely into it but with Win9X you didn't notice because it didn't run an executable file to start windows. You did notice if you edited boot.ini and set bootscan=0 then a GUI would flash for a second and you'd be in DOS. and either way it still ran autoexec.bat.. and i'm not sure but maybe ran config.sys too. – barlop – 2011-08-05T13:41:44.327

19X also had something funny called DOS mode it could do after going into windows which might not be the same as the DOS it could go to if you set bootscan=0 and just let it boot to a DOS prompt. I recall an autoexec.win and config.win (as oppose to .nt), though not sure what they were for.. – barlop – 2011-08-05T13:43:20.080

@barlop: In Windows 9x, MS-DOS 7 boots first (at this point the user can press F8 to get options to use DOS without starting Windows), and after processing CONFIG.SYS and AUTOEXEC.BAT completes, a file called "win.com" is automatically loaded -- this is where Windows 9x starts to load. The pretty graphical image (with the sliding colours across the bottom) that appears during the MS-DOS 7 startup process is a new feature in MS-DOS 7 that makes the boot process appear less technical to the user. – Randolf Richardson – 2011-08-05T15:56:53.133

Was editing msdos.sys bootgui=0 logo=0 bootwin=0 , i think bootsafe and bootscan were related to scandisk running. What was DOS mode though, had that exited Windows? and what were config.win and autoexec.win ? autoexec.dos and config.dos ? – barlop – 2011-08-05T17:59:01.277

2@JdeBP: Go FidoNet! – Ƭᴇcʜιᴇ007 – 2011-08-06T00:05:58.937

2

For those interested: The Role of DOS in Windows 95.

– Kyte – 2011-08-06T03:04:01.687

6However you still can't use the reserved DOS device names in Windows 7 under explorer.exe! – LawrenceC – 2011-08-07T21:46:13.743

@ultrasawblade: Correct (+1). Do you mean device names like "con:" and "nul:" (which may also be used by some native MS-Windows applications), or was there something in particular that caught your interest? – Randolf Richardson – 2011-08-07T22:47:39.103

5

People! You know how this site works. If you want to ask questions about DOS mode, meanings of msdos.sys options, and why one cannot use several names as filenames in Win32, then use the Ask Question hyperlink at the top of this page. Start, moreover, by reading the questions from people who already have.

– JdeBP – 2011-08-07T23:35:19.323

1Also check out Inside Windows 95 and Inside Windows NT to go back and see the architectures back then (why bother looking at current Windows). – Synetech – 2011-08-08T05:59:24.373

which ever way you look at it, XP, Vista and 7 still have many inherited features from DOS which make people think Windows sits ontop of DOS, like partitioning storage into Drive C:, D: and many CMD commands that are identical. Windows would've been better off if it had adopted the UNIX file system, Kernel and functionality. – Frank R. – 2011-10-23T19:56:55.007

23

Additionally Windows 95 wasn't entirely a GUI on top of DOS. Read more here:

http://blogs.msdn.com/b/oldnewthing/archive/2007/12/24/6849530.aspx

Strabbi

Posted 2011-08-04T15:07:14.663

Reputation: 331

1I remember this, the whole VxD interface and VMM switcher. It was an interesting way to move forward somewhat on an OS and still have a lot of backwards compatibility. – Rich Homolka – 2011-08-04T21:14:57.483

Windows 95 did come with MS-DOS 7 though, and one could use just the DOS portion to make a DOS-only boot disk and have something that felt like a slightly broken edition of MS-DOS 6 (but also with a few new additional features). – Randolf Richardson – 2011-08-05T02:41:37.093

4The is the most correct answer: Windows hasn't relied on DOS since Windows 95. And strictly speaking Windows 3.11 didn't need DOS once the 32-bit drivers took over. But 3.11 didn't come with a boot-loader; so it needed DOS to get it to starting point. – Ian Boyd – 2011-08-05T03:01:54.520

1That blog is a pretty good read, thanks for the link – crasic – 2011-08-06T04:11:37.097

20

No. All Windows versions prior to those with the "NT kernel" were more like a GUI on top of DOS. With NT, which became particularly commonplace with the introduction of Windows XP (and Windows Vista and Windows 7 both use the NT kernel as well), the need to use DOS as the underlying OS was eliminated.

32-bit versions of Windows still have a DOS prompt, which can be run by entering command.com in the run dialog, and it can run most old DOS programs. All versions of Windows have a command prompt that can be used to run batch files and DOS-like commands (which are typically native Windows applications that are designed to interact with the DOS-style console). 64-bit Windows cannot run DOS applications because it does not support 16-bit processes.

You'd probably be best to view the command prompt as being more like a specialized application that can be used to run DOS programs and/or start Windows programs from the command-line.

Note: The terminology "DOS prompt" was commonly used to describe the "command prompt" prior to the introduction of the NT kernel. Although many people still use the term "DOS prompt" today (because they use it to run many of the same commands, which were originally referred to as "DOS commands," that are typically available in a DOS environment), the term "command prompt" is technically correct in NT variants of Windows.

Randolf Richardson

Posted 2011-08-04T15:07:14.663

Reputation: 14 002

@Hello71 wrong. In Linux for instance it can. And you can run 16-bit DOS and Win 3.1 apps in 64-bit Linux. – Anixx – 2016-09-16T10:59:24.013

13Legacy (ancient, 16-bit) DOS applications are run in the NTVDM, which is emulated inside the command prompt subsystem. The NTVDM is not available in 64-bit Windows systems, so you need a 3rd party emulator to run 16-bit DOS apps, such as DOSBox or VirtualBox. – afrazier – 2011-08-04T15:20:42.543

11The reason why the NTVDM isn't available in 64-bit Windows is because it is merely a thin wrapper that switches the CPU to 16-bit mode before running the code. In 64-bit mode, the CPU can only switch to 32-bit mode temporarily to run 32-bit code; it cannot run 16-bit code without a cold reboot. – Hello71 – 2011-08-04T16:08:41.240

2

Note to all: Comments have been cleaned from this post. To those involved: Please keep it civil and remember that extended discussions should be moved to chat whenever possible - excessive comments on a post become very noisy for other visitors.

– DMA57361 – 2011-08-05T16:04:36.777

Since people continued to argue vehemently about this post, we're locking it for now. Comments have been removed, again. – nhinkle – 2011-08-08T18:39:48.767

5

More as an anwer to Randolf, but he isn't the only one, confusing command line interfaces and DOS repeatedly.

Note, that many of the [DOS] and [MS-DOS] tags suffer from the same mistake: MS-DOS initially had only a textmode, a commandline interface called command.com + norton commander for many of us, and a homegrown textmode windows with frames, drawn with ansi.sys, but controllable not only by keyboard, but by the mouse, but more easily with the arrowkeys and hotkeys, too.

Then windows was build on top of DOS (2.0, 3.0, 3.1, 3.11), where an icon for DOS-Box reappeared inside windows, as a name for the command interface inside windows.

But in Windows-NT and in Windows-95 or -98 MS-DOS was abandoned, but a command-interpreter, cmd.exe (cmd32.exe) still existed, with the same, or nearly the same syntax and keywords. But this was a program, running inside Windows, as other text-style command interpreters, like BASIC, irb (Ruby), scala-repl, psql (Postgresql), sqlplus (oracle), bc, R, rhino, and so on, and so on, running on several platforms.

Calling this MS-DOS-style is misleading, since DOS or MS-DOS whern't the ones which first came up with it. It's much older.

Even on Windows it wasn't restricted to run DOS-commands - a common practice of batch-file writing was, to specify some parameters, before starting a Windows program. For example setting a CLASSPATH, JAVA_HOME, java-parameters like -Xmx and so on for a Java-program.

Many people think command line interfaces are a relict of former times - who don't know the power of processing thousands of files with a few keystrokes. They don't know of wsh and monad either. But for professionals, a command interpreter is on windows nearly as useful as on Unix or Linux. It's not that well known, but it is essential for many administrators.

There is even a port of the gnu-toolchain, with an sh.exe and sed, awk, bc, tail, rev, cat and all that as native win32 apps.

Maybe you can run old DOS-programs under cmd.exe, but you can't run Windows programs in DOS mode, so don't keep telling the people, that cmd.exe is DOS - it isn't. And it isn't DOS-like. What you mean, is an interactive command-line program, a command-line interface.

  • DOS prompt
  • DOS batch files
  • DOS-like commands
  • DOS-style console
  • DOS applications

is almost always misleading terminology. It might be appropriate for an amateur, but if you want your audience to understand, what you're talking about, you should ask yourself: Is it restricted to a special OS, to DOS? Is the CLI-style best named 'DOS-style'? Is this historically correct? Does your audience know DOS at all? Is it helpful in understanding? Do those programs really run on DOS?

You need the right expressions, sharp as the knife of a surgeon, to explain complicated things. Wrong expressions provoke wrong impressions in the brain of your audience. Sloppy expressions are worse than nothing. Avoid them. Use CLI if command-line interface is to long for you to type.

Correct misleading tags on SU, SE and other sides.

user unknown

Posted 2011-08-04T15:07:14.663

Reputation: 1 623

In Win95 and Win98 there was no cmd.exe. – Anixx – 2016-09-16T11:01:53.917

Well said. Lots of bad terminology around. – Milind R – 2014-02-18T05:26:34.613

2

In Windows NT family (NT, 2000, XP, 2003, Vista, 2008, 7) it's DOS independent. There are only DOS emulators for backward compatibility.

However there are still some limitation which are consequences of compatibility with DOS in early NT days. For example you are not able to create file or directory named "CON" or "PRN" because those are reserved names to represent devices in DOS.

Michał Šrajer

Posted 2011-08-04T15:07:14.663

Reputation: 2 495

1

Actually, now Windows doesn’t use DOS anymore. Prompt to DOS (or cmd) is emulated over Windows XP, Vista or Seven. Windows boots up from its own resources.

Diogo

Posted 2011-08-04T15:07:14.663

Reputation: 28 202

9-1: Wrong. It's not to DOS (or cmd). There is a command interpreter, cmd.exe, but that's not DOS. DOS had a command interpreter too, command.com, which is very similar in syntax, keywords and usage, but the command interface is just a part of DOS; it isn't DOS. – user unknown – 2011-08-04T22:33:59.350

Yep The console type in the PE header is a part of the Win32/Win64 subsystem. It is not 16-bits at all. – user2284570 – 2013-12-17T21:34:00.987