Using DOS 7.0 without the Windows 95 GUI

There are two ways to use DOS 7 without the GUI. The tough way is to understand the whole process of how Windows 95 boots. The easy way is to put menu items in your CONFIG.SYS and AUTOEXEC.BAT. I'm not sure which one I like better, but I do it the easy way these days.

Valid HTML 2.0! W3C HTML Validation Service


Using DOS 7.0 without the Windows 95 GUI

Windows 95 comes with a completely functional and stable version of DOS -- DOS 7.0. You may hear reports that DOS 7 is not stable with the rare DOS program. I have yet to hear of a single application that doesn't work in DOS 7. (Except that low level disk utilities won't work on compressed drives.) The only major exception is that running DOS programs without first loading the GUI, will destroy long filenames. (But see Schulman's book referrenced below.)

There are some programs that rely on the internals of DOS and need to be rewritten for each version of DOS -- they know how to handle all previous versions of DOS but don't know about DOS 7 since it wasn't yet available. If you're paranoid, it might be a good idea to hold onto that previous version of DOS until you're assured you don't need it. This same issue has been a problem with every new version of DOS. (Remember TSRs?) It has nothing to do with the packaging of DOS 7 with Windows 95. Microsoft has been very careful not to break existing applications, with this upgrade. (At least, not by accident.)

As for the version report that you get when you type VER, it is nothing more than a text string inside the DOS 7 system files. If you use a replacement for command.com such as Norton ndos, it will report the version as DOS 7. This comes from asking DOS using a system call: the VER command is trying to fool you by spitting out this text string. Don't worry about it, the only thing that really matters is what the system call provides. (Although that's a big can of worms for systems programmers.)

To use DOS 7

To use the raw DOS 7, you need to edit the MSDOS.SYS file in your root directory. Be careful though, the MSDOS.SYS file in previous versions of DOS was a binary file. Windows 95 juggles these filenames when you boot to an earlier version of DOS. Make sure you edit the Windows 95 text version.

MSDOS.SYS

Before you can edit MSDOS.SYS you must change it's attributes to -r -h -s. You can leave the attributes set that way if you're careful not to delete the file.

Here's what the lines in MSDOS.SYS mean.
Set Options =1 to turn the option on, and =0, to turn it off.

WinDir=C:\w95
This is the directory that Windows is in. It is automatically placed into your PATH variable.
WinBootDir=C:\w95
This is the directory that WIN.COM is in. It is automatically placed into your PATH variable.
HostWinBootDrv=C
This is your boot drive.
BootMulti=1
Allows you to boot your old version of DOS by using the F8 key at startup.
BootGUI=1
Automatically loads the Windows 95 GUI when you boot DOS.
Network=1
Allows you to use a network. I don't much about what this option affects.)
Logo=1
Displays the cloud to hide the stuff displayed by CONFIG.SYS and AUTOEXEC.BAT.

Here's my MSDOS.SYS that boots into a normal DOS 7.
[Paths]
WinDir=c:\w95
WinBootDir=c:\w95
HostWinBootDrv=C
[Options]
BootMulti=1
BootGUI=0
Network=1
Logo=0

Note that on my system, both paths are set to C:\W95. That's because I moved the files from C:\W95\COMMAND into C:\W95. This makes my path shorter--nothing magical or important about it otherwise. The BootMulti=1 allows me to use F8 to boot into DOS 5, but BootGUI=0 leaves me sitting at an ordinary DOS 7 prompt after booting. Make no mistake, this DOS 7 is a fully functioning DOS. The only annoying thing is that DOS 7 automatically loads the IFSHLP.SYS driver which takes up a few kilobytes of low DOS memory.

Using Windows 3.1 with DOS 7
a.k.a. Juggling DOSes without pulling your hair out

To use Windows 3.1 you need to add the W31 directory to your path. The only problem is that DOS 7 primes the path with the WINDIR and WINBOOTDIR entries from MSDOS.SYS. Unless you do something about this, you'll end up starting Windows 95.

To prevent Win95 from booting up

Make the following changes to your MSDOS.SYS:
WinDir=c:\
WinBootDir=c:\

Then add the following line to your AUTOEXEC.BAT before any other PATH statement.
PATH=

This sets the PATH environment variable to nothing. In effect, it clears the Windows 95 directories off your path. Now you can set your path to anything you like. Here's my favorite:
PATH=c:\bin;c:\dos7;c:\w31

I copied most of the DOS related files from C:\W95\COMMAND into C:\DOS7. This lets me decide which files are on my path when I use DOS 7. For example, I didn't put WIN.COM in this directory, so I can't boot into the Windows 95 GUI by accident. All of these files also live in C:\W95 so they're available when I use a DOS 7 window or MSDOS compatibility mode. It may sound nuts to have two copies of these files, but they only take 1.25 MB of disk space and now I control which version of a DOS program gets executed. Notice the order of the directories in the path. I can override any program by putting a different copy into C:\BIN. I put EDIT from DOS 5 in C:\BIN, so I always use that EDIT, but I use CHKDSK from DOS 5 or DOS7 depending on which system I boot into. As another example, when I execute SORT, I end up using a fast 32-bit sort program that I wrote.

This might make more sense if you consider my path for DOS 5.
PATH=c:\bin;c:\dos5;c:\w31

When I'm using DOS 5, I end up using the DOS 5 version of programs, except for certain programs I keep in C:\BIN. When I'm using DOS 7, I end up using the DOS 7 versions of those programs, except those in C:\BIN.

DOSSTART.BAT

The Windows 95 setup removes certain drivers from your AUTOEXEC.BAT because they interfere with the Win95 protected mode drivers. The Windows setup program puts these drivers in a file called DOSSTART.BAT. When you run DOS in MS-DOS compatibility mode from the GUI, these missing programs get executed--the system arranges to call the DOSSTART.BAT batch file. These drivers include the mouse and MSCDEX drivers. If you need the drivers in the raw DOS, copy DOSSTART.BAT into a directory on your path, such as C:\BIN. You might also want to edit this file to add or change other things, such as specifying a different PATH. To get mouse and CD-ROM support in the raw DOS 7, type DOSSTART. Of course, you don't want to run the Windows GUI after loading these drivers. Windows will crash with some drivers, such as MSCDEX.EXE, which is why you want to remove the 2 Windows paths from MSDOS.SYS.

In other words, I boot initially with everything ready to go into the Windows GUI. But I can always execute DOSSTART.BAT which loads my mouse and MSCDEX, and also has the blank PATH= and a real PATH statement that doesn't include Windows 95. The only drawback is that I can't get into Windows 95 without rebooting the computer. (But Windows 3.1 is okay.)

Those Pesky Config Files

If you've read the previous topics, you know everything you need to know to manage different setups. If you have any experience with DOS games, you know that you need a different combination of drivers and memory managers for almost every decent game. It's no different with Windows 95 (a.k.a. DOS 7.0). The only wrinkle is that you also need to handle different MSDOS.SYS files.

I store different versions of MSDOS.SYS, CONFIG.SYS, and AUTOEXEC.BAT in a C:\SYS directory. I give them names like W95.XXX and DOS7.XXX, where the XXX is MSD, CON, and AUT. I wrote batch files to copy the three files into the C:\ directory (as MSDOS.SYS, CONFIG.SYS, and AUTOEXEC.BAT) to change the setup before I reboot. I even added shortcuts to these batch files to the Start menu to make it easy to change the configuration from Windows. Now when I type BOOTDOS7 or click the BootDOS7 icon, the DOS 7 files are copied to my root directory, ready for me to reboot into DOS 7 without Windows. When I type BOOTW95 or click the icon, a different set of these files is copied to my root directory, ready for me to reboot right into the Windows 95 GUI.

To boot to DOS 5 or 6, use F8. You can also have different sets of configuration files for different DOS 5 setups, but it's not easy to write a batch file to boot you right into DOS 5. You just have to remember to use F8 when you do this. If you must use more than one extra DOS, your best bet is to use boot disks and set the SHELL and COMSPEC variables in CONFIG.SYS and AUTOEXEC.BAT on the disk to point to a DOSx directory with the appropriate DOS version x files, where x could be 33, 5, 622, or even (heaven forfend) 2. If you need help with this RTFM.

When I play DOS games, I need to have my mouse and CD drivers and a memory manager loaded, but I don't want Windows 95 on my path. With the changes to MSDOS.SYS shown above, WIN.COM (from Windows 95) isn't on my path (but Windows 3.1 is), so if I type WIN I get Windows 3.1. When I want to use Windows 95, I run a batch file to copy a different set of the three files, and then boot into DOS 7 with the correct path and drivers for running Windows 95. When I type WIN, the Windows 95 GUI boots up.

Returning to DOS after running Windows

There are several ways to return to DOS 7 after running Windows. The easiest way is to move the LOGOS.SYS and LOGOW.SYS files to a backup directory, or just delete them. One of these is the cloud picture that Windows displays to hide the output from CONFIG.SYS and AUTOEXEC.BAT. The other is the picture that you see when you shut down Windows. If you remove these picture files, Windows will return to DOS after you select the "shut down the computer" option. You also need to set BootGUI=0. One glitch is that it's easy for a misbehaving program to bash the real DOS, so you may find that you occassionally need to hit the reset button after dropping out of Windows. (No, Ctrl-Alt-Del won't work if this happens.) This isn't a Windows 95 thing: it happens exactly the same way in Windows 3.1, only not as often.

The Easy Way

I've just about given up on using DOS 5, except for a few games that need that last bit of memory. (MS-DOS 7 insists on loading IFSHLP.SYS which is just a bit more than some games can handle after loading the mouse, sound, and memory drivers.) These days, I stick with MS-DOS 7 and use multiple configurations in my CONFIG.SYS and AUTOEXEC.BAT. This gives me the option of booting into a normal DOS configuration (with MOUSE.COM and MSCDEX.EXE loaded), going straight into the Windows 95 GUI (or the Windows 3.1 GUI which I hardly ever do anymore), or setting up one of those picky games.

The easiest way to make this work is to set BootGUI=0 in MSDOS.SYS. If you want to go into the Windows 95 GUI, you can launch it as the last command in your AUTOEXEC.BAT. You can get into Windows 3.1 the same way if you use the "PATH=" command to get the Windows 95 directory off the PATH and follow it with PATH=c:\Win31;c:\dos;c:\etc.

The DOS manual (for DOS 6) explains how to set up multiple configurations in the CONFIG.SYS and AUTOEXEC.BAT. For an online explanation go to Other Sources of Information.


Other Sources of Information

This section contains links to the most useful web sites related to the DOS/Windows 95 connection. If you're looking for quantity, use a search utility. These have answered to a higher authority.

Windows95.com - The Windows 95 Internet Headquarters

This is a great site for information on Windows 95. I like to think of it as online technical support. It has quite a bit of information on running MS-DOS 7, plus a whole lot more. The down side (if you can call it that) is that there's so much information it can be tough to find what you're looking for.

Unauthorized Windows 95 web site

Andrew Schulman's Unauthorized Windows 95 [IDG Books] is the best source of information on the Windows/DOS relationship. There's a developer's edition that comes with a disk of snooping utilities. Be forewarned that not all of the utilities work on the retail version of Windows 95--he wrote the book using the Beta version of Windows 95. O'Reilly and Associates maintains the web pages containing updates to the book, some very useful systems-level utilities you can download and use, source code, and other information. If you visit the Unauthorized Windows 95 web site be sure to look at the available programs.

The book is meant for systems programmers. In the first few chapters, he explains how to set up the bottom half of Windows 95--no GUI, but virtual machines, a flat virtual memory space, 32 disk and file access, and long file names are accessible in this VMM32 mode (as Schulman refers to it). The problem is that you have the choice of executing it as a temporary shell or executing it as a permanent shell from which you can neither go back to a normal DOS nor launch the GUI part of Windows. (Can you say Ctrl-Alt-Del?)

Before you try this at home, I should warn you that this is not for the faint at heart. I have been programming for 5 years, and have been following the other books in the Schulman "Undocumented" series, and he goes way over my head at the drop of a hat. Consider that his purpose is to provide information about Windows 95. Why anyone would actually want to use this half-baked version of Windows is beyond me. On the other hand, game programmers could get access to threads, a large flat memory space, virtual memory, fast 32-bit disk access, long file names, and inter-VM communications, while still having total control over the machine--the best of both worlds.


Last updated July 12, 1997
Have a question or comment or just want to get in touch? E-mail me at stevieo4@erols.com