FIX REINSTALLATION PROBLEMS WITH MSDOS.SYS

If you attempt to upgrade or reinstall Windows 9x to a different location on your hard disk and it doesn't go smoothly, your system may refuse to boot. The Msdos.sys file can prevent hours of frustration while you try to work out what went wrong.

Msdos.sys used to be a binary system file in earlier Windows and DOS environments, but now it's a text file that configures some preboot Windows options. To edit the Msdos.sys file, you must remove the attributes that protect it. However, make sure you have a backup first, because damaging the current settings in this file could leave a working system completely nonfunctional.

To remove the Read Only, System, and Hidden attributes, open the command prompt and type Attrib c:\Msdos.sys -r -s -h. To open the file in a DOS text editor, type Edit c:\Msdos.sys. With Msdos.sys open, you can look at the Paths settings, which are located at the top of the file, to define where Windows should look for its system files. For example:

[Paths]
WinDir=C:\WINDOWS
WinBootDir=C:\WINDOWS
HostWinBootDrv=C

WinDir and WinBootDir are usually the same, although WinBootDir specifically defines the files Windows needs to boot from, and WinDir defines the rest of the Windows files. These should point to the directory where you've installed Windows. If your reinstallation failed to update this file, altering these paths may fix the problem.

HostWinBootDrv is nearly always the same drive letter as specified by the other two paths, unless DriveSpace is loaded. In this case, the value will be the letter of the drive that hosts the Windows installation. An incorrect setting here will also cause the system to fail.

There are other settings under the Options header that can provide some control over the Windows boot process. For example, if you want to stop users from invoking the Boot Options menu at Startup by pressing the Function keys, add the line BootKeys=0 on a new line under the Options header.

When Windows shuts down improperly, Scandisk runs by default. It prompts the user but automatically runs in 60 seconds, even if there's no response. To force Scandisk to run without prompting the user, change the Options setting AutoScan=1 to AutoScan=2.

You can also force the system to boot straight into a command prompt instead of Windows by including the line BootGUI=0 in the Options section. For a comprehensive list of the optional settings that can be made to the Msdos.sys file, check out Microsoft Knowledge Base article Q118579.
http://support.microsoft.com/support/kb/articles/Q118/5/79.asp

After you've completed manually editing the Msdos.sys file, reapply the file attributes with the following command:

attrib Msdos.sys +s +h +r

At the end of the file, you'll see lines that begin with a semicolon, such as:

;
;The following lines are required for compatibility with other programs.
;Do not remove them (MSDOS.SYS needs to be >1024 bytes).
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxa
;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxb

These lines are just remarks that provide padding to make the file larger than 1,024 bytes. However, they're required by a bootable system for backwards compatibility and must not be removed.