What Do You Mean, "DOS"?
"Windows 95 runs on top of DOS!!" the first-rung geeks cry, usually followed by some "proof" or other that they've discovered for the first time. Well, it can if it has to (i.e. Safe Mode), but the relationship between Windows 9x and DOS is far more flexible and complex than that - and all the variations can be quite bewildering! You need to be clear on such matters not only for semantic purposes, but so you can troubleshoot effectively.
If you talk about "DOS" in Win9x, do you mean:
All of these fall into one of three categories; an emulated DOS environment within Windows, a true DOS mode using the DOS that is packaged with Windows, or a previous version of DOS (typically that over which Windows was installed).
Note that Windows Millennium (in its unmodified form) has no hard drive based DOS mode at all. The only "DOS" options are command prompt under Windows, or DOS boot off diskette or CD-ROM.
This serious omission can be cured.
Strictly speaking, this isn't DOS at all:
The 32-bit driver support includes mouse and CD-ROM, and SVGA and sound are also affected. This may also be the only "DOS" that provides access to Windows-only printers and modems. In many cases, this is often a "better DOS than DOS" in that you can run a DOS game that requires 8M of RAM on an 8M PC while other Windows apps are still open. You may also find that games that don't work with SVGA or sound in true DOS mode will work within Windows, and vice versa.
Note that although Long File Names are supported at the Command.com level, applications written for DOS or Windows 3.yuk won't be able to see them, and will still see only the underlying true 8.3 names.
This will give you Windows 9x's bundled DOS in its pure form. If you choose the "Safe Mode" variation, it will bypass C:\Config.sys and C:\Autoexec.bat and load as DOS=NoAuto, i.e. no automatic loading of SetVer, HiMem.sys or IFSHlp.sys takes place. If you choose the "normal" variation, your system C:\Config.sys and C:\AutoExec.bat will be processed, as will the usual DOS=Auto settings unless Config.sys overrides these.
Compared to a DOS prompt within Windows:
These methods of running DOS mode cannot use their own Config.sys and Autoexec.bat settings, so they cannot match the control offered by "Specify a new...". However, you can "park" the system in DOS mode from here by adding an explicit DOS=Single line to C:\Config.sys, or by editing C:\MSDOS.SYS to add a BootGUI=0 line under [Options], or by creating a copy of MSDOS.SYS as C:\WinBoot.INI and editing that so that it overrides MSDOS.SYS - all of these have the effect of preventing Windows from starting automatically on boot.
DOS mode via a .pif set to "Use with current..."
This will also give you Windows 9x's bundled DOS in a pure-ish form - however, Windows is still lurking in the background (do a Mem /C/P and look for "Win" present). This particular DOS mode will be running on whatever was set up by C:\Config.sys and C:\AutoExec.bat when Windows started, plus anything additional from DOSStart.bat in the Windows base directory. All that was written about DOS mode via the F8 boot menu applies here as well.
This is the default mode for .pif files that are set to run in MS-DOS mode (e.g. "Exit to DOS.pif"), but it's pretty useless for three reasons:
To end a .pif-based DOS mode session, use the "Exit" command - do not use the "Win" command! . If the session did anything to invalidate the original real-mode conditions that were in effect when Windows loaded, the system will reboot; else Windows will restart as if it had been explicitly loaded via a "Win" command. Note that if you switch off or reset the computer while in a "Use with current..." session, the next reboot will restart Windows.
DOS mode via a .pif set to "Specify a New..."
This will also give you the very best of Windows 9x's bundled DOS in a its purist form. Windows has left the building in this mode, so if your DOS session crashes or reboots, you know Windows is safe.
This particular DOS mode will extract its own private C:\Config.sys and C:\AutoExec.bat files as .app forms. Next, it will copy the active versions to .wos forms, and then rename the .app files to the active names (Config.sys and AutoExec.bat). Then Windows shuts down completely and the system reboots into pure DOS mode using the appropriate startup files. The Windows DOSStart.bat plays no role in this process; it is not interpreted at any stage in this process. All that was written about DOS mode via the F8 boot menu applies here as well.
This is an optional mode for .pif files that are set to run in MS-DOS mode (e.g. "Exit to DOS.pif"), and it's the best way to go for several reasons:
To end a .pif-based DOS mode session, use the "Exit" command - the advice to not use the "Win" command applies with a vengeance, as this would run Windows on top of a probably unsuitable real mode environment! . When the Exit command is processed, all changes to the active Config.sys and Autoexec.bat are re-incorporated into the .pif from whence they came; the .wos forms are renamed back to the active names, and the system reboots to put these into effect before loading Windows.
This is a completely different animal to anything described above - this really is MS-DOS. If Windows was installed over an existing DOS, this option will be present in the F8 menu; otherwise probably not. Note that no stand-alone version of MS-DOS can read FAT32, and that an attempt to use this facility in Windows 95 Service Release 2.x will leave the system unable to return to Windows until you repair the mess of mis-versioned boot files it leaves behind. For this reason it's best-practice to remove all C:\*.dos files after installing Windows 95 SR2.x
When you install Windows over an existing MS-DOS, the existing IO.SYS, MSDOS.SYS, Command.com, Config.sys and Autoexec.bat in C:\ are all renamed to .dos forms. If you choose the "Previous version of MS-DOS" option from the F8 boot menu, and these files are found, then the corresponding Windows files are renamed to .w40 and the DOS files are renamed to the active names, before the system boots the old DOS.
All that was written about DOS mode via the F8 boot menu applies here as well, with whatever extra limitations that might apply to the older DOS version; no LFN protection, no "Lock" and "Unlock" commands to manage that feature, no FAT32 support, etc.
When the system is reset or powered off, the next boot will cause the active files to be renamed back to .dos and the .w40 names to be renamed back into active service, so that the system boots into Windows as normal. I haven't tested whether this is a consequence of the existence of .w40 files, or as a result of a setting below IO.sys (i.e. at the partition boot loader level). Because the Windows 9x IO.sys is not running while it is renamed away, it can't be a matter of reading the registry (as is the way the system "knows" which "Specify a new..." .pif to return from).
If you do support...
...of any kind (especially over the phone or via the Internet), you must be absolutely certain which of the above apply before providing advice about "DOS" - and especially, how to get back into Windows! You should also determine whether it is safe to attempt Windows, or whether whatever is causing the "trapped in DOS" effect also poses risks to the file system and data on the drive.
There are three situations where you need DOS mode:
When is it not safe to run Windows? When any of the following apply:
Windows can't run without barfing temp files all over the place, which is death in any kind of data recovery context - hence points (1) and (2). If you boot a hard drive in another system, Plug and Play will immediately start detecting all the new hardware and messing up the settings for your existing hardware, and you really don't want that - hence point (3) as an issue on its own.
Points (4) and (5) go about replacing files that are always "in use" and making sure you don't have active malware undoing your attempts to remove it even as you work. For sub-Windows malware (DOS file infectors and sector-level infectors) you shouldn't be running any code off the hard drive at all - you need to do a formal virus check.
(C) Chris Quirke, all rights reserved - January 2001