[Previous] [Contents] [Next]


The Windows 95 File Structure


As mentioned earlier in this tutorial, Windows 95 disk structures are nothing new. Partitions still work in exactly the same way as they did in Windows 3.x systems, so the MS-DOS 7 bootable files of Windows 95 must still be installed to the C drive. Windows 95 still uses 16-bit FAT formats for hard disk drives and floppy disks. Hard disks formatted with Windows 95 are identical to disks formatted with MS-DOS.

NOTE
Using 32-bit FAT provided with Windows 95 OSR2 or Windows 98 reduces the necessity for multiple partitions because cluster size is set at a default of 4 KB.

Windows 95 has also added some new bits of file information. The best one is a "last accessed" date value that tells when a particular file was last used (includes executable files, DLLs, and other nonuser data files such as font files).

Important System Files

Windows 95 starts up differently from earlier versions of Windows. The startup relies on several files that both complement and work independently of each other. We introduced most of these files in earlier sections of this tutorial. Now let's take a look at what makes them tick.

IO.SYS

This is the real-mode operating system for Windows 95. Most of the "old" CONFIG.SYS commands have been incorporated into the IO.SYS. If you recall, the IO.SYS does most of the work that was done by the CONFIG.SYS file in MS-DOS. For that reason, Windows 95 no longer requires a CONFIG.SYS.

IO.SYS includes the files:

  • COMMAND.COM.
  • HIMEM.SYS.
  • IFSHLP.SYS.
  • SETVER.EXE.

IO.SYS also includes the following commands:

  • dos=high
  • files=
  • lastdrive=
  • buffers=
  • stacks=
  • shell=
  • fcbs=
NOTE
The IO.SYS file cannot be changed or overwritten. The only way to override these commands is to create a CONFIG.SYS or edit an existing CONFIG.SYS. Remember that a CONFIG.SYS file is not required with Windows 95; however, if one exists, it will take precedence over any commands or files in IO.SYS.

EMM386.EXE is a memory manager left over from Windows 3.1, and it is not loaded by IO.SYS. EMM386.EXE is an MS-DOS driver that uses extended memory to simulate expanded memory. Some older MS-DOS-based programs take advantage of this memory in order to run. If you have an application that needs EMM386.EXE in memory, you must add it to your CONFIG.SYS file.

MSDOS.SYS

As mentioned earlier in the tutorial, in the days before Windows 95, MS-DOS used two system files to boot up: IO.SYS and MSDOS.SYS. The IO.SYS file provided the system initialization code, and the MSDOS.SYS file loaded basic system drivers. In Windows 95, MSDOS.SYS functions have been incorporated into the IO.SYS file. MSDOS.SYS is now a special information file. It contains two components: paths used to locate other Windows files and options to add information that helps run older MS-DOS programs. MSDOS.SYS is a text file that can be edited with any file editor. It is hidden and read-only, therefore the attributes must be changed to make the file read/write, nonhidden (the MS-DOS command attrib -r -h filename makes the file accessible).

To open MSDOS.SYS:

  1. In Windows Explorer, select Options from the View menu to display the Options dialog box.
  2. Activate the Show All Files option and click OK (this makes all hidden files visible).
  3. In the Folders window, highlight the root folder (C:\).
  4. Select MSDOS.SYS and right-click it.
  5. Select Properties. (See Figure 16.3.)
  6. Deactivate the Read-only check box and click OK.
  7. Figure 16.3 MSDOS.SYS properties sheet

The following table lists what you'll find in the [PATH] Group of MSDOS.SYS.

Setting Function
HostWinBootDrv=C The drive letter of the system boot drive. Always the C drive.
UninstallDir=C:\ The location of the Windows 95 uninstall file.
WinBootDir=C:\WINDOWS The location of the Windows files needed to boot.
WinDir=C:\WINDOWS The location of the GUI files.

The following table lists what you'll find in the MSDOS.SYS [OPTION] Group. Unless otherwise specified, the values are either 0 or 1.

Setting Function
BootConfig= If you have multiple hardware configurations, this allows boot up of a particular hardware configuration. For example, BootConfig=2 would start configuration 2.
BootDelay=X Determines the number of seconds that the "Starting Windows 95" message appears during startup. Default is 2 seconds.
BootGUI=1 Sets whether to boot the Windows 95 GUI or not. 0 boots to the MS-DOS prompt.
Bootkeys=1 Sets whether to allow use of function keys at boot. 0 disables the keys.
BootMenu=0 Sets whether to load the boot menu. 1 shows the menu.
BootMenuDefault=1 Determines which of the startup menu options is highlighted automatically when you invoke the menu:

l = Normal
2 = Logged to BOOTLOG.TXT
3 = Safe mode
4 = Safe mode with network support (if network installed). If a network is not installed, this line item will not be available and the following steps will be numbered accordingly.
4 or 5 = Step-by-step
5 or 6 = Command prompt
6 or 7 = Safe mode command prompt
7 or 8 = Previous version of MS-DOS (if BootMulti=l).

BootMulti=0 Determines whether to prompt for previous version of MS-DOS in boot menu-requires BootMenu=1.
Bootsafe=0 Forces the machine to boot in safe mode. 1 invokes safe mode.
Bootwarn=1 Sets whether to show the "You are in Safe Mode" warning message. 0 does not show the message.
BootWin=1 Determines whether to boot from your previous version of MS-DOS or Windows 95. 0 selects MS-DOS.
DisableLog=l Enables or disables the BOOTLOG.TXT file. 0 disables the log.
DoubleBuffer=1 Sets whether to load VFAT's double buffer or not. 0 doesn't load the buffer.
Drvspace=1 or Dblspace=1 Loads DOUBLESPACE or DRIVESPACE drivers. 0 stops the drivers from loading.
LoadTop=l Loads COMMAND.COM at the top of 640 KB. 0 loads it normally.
Logo=l Sets whether to show the animated Windows logo. 0 doesn't show the logo.
Network=1 Sets whether to add the Boot In Safe Mode With Networking menu to the startup menu. 0 doesn't show it.
SystemReg=1 Determines whether to load the system Registry. 0 prevents the Registry from loading.
IMPORTANT
Older programs, especially antivirus programs, expect the MSDOS.SYS file to be larger than 1024 bytes. To make MSDOS.SYS large enough to prevent these problems, 19 lines of x's are included to keep the file size large enough for compatibility. (See Figure 16.4.)

Click to view at full size.

Figure 16.4 MSDOS.SYS in Notepad

CONFIG.SYS and AUTOEXEC.BAT

These two familiar files play roles very similar to those in the old MS-DOS world, with one important exception: Windows 95 automatically loads drivers and sets defaults by using the IO.SYS file and the Registry. If you have a software or hardware device that needs a driver not contained in the IO.SYS file or Registry, Windows 95 will use the commands contained within CONFIG.SYS and AUTOEXEC.BAT files.

If you edit AUTOEXEC.BAT and CONFIG.SYS to override some of the information contained in the Registry and IO.SYS file, remember to avoid the following items.

In AUTOEXEC.BAT:

  • Don't include other versions of Windows in the path statements.
  • Don't add SMARTDRV.SYS or other device caches. Windows 95 has built-in disk-caching.
  • Don't add any statements for loading mouse drivers. Windows 95 includes mouse support.
  • Don't make your network connections by using commands in the AUTOEXEC.BAT file; do it from inside Windows 95.

In CONFIG.SYS:

  • Remove any device=mouse.sys command. Windows 95 includes mouse support.

COMMAND.COM

Windows 95 comes with a few "MS-DOS-like" real-mode components. These are necessary to get it going and get into protected mode. It provides the MS-DOS prompt (C:\) and a few internal MS-DOS commands. The following table lists COMMAND.COM's internal MS-DOS commands:

Command Function
BREAK Sets or clears extended CTRL+C checking.
CD and CHDIR Changes to a different directory or displays the current directory.
CHCP Displays the number of the active character sets.
CLS Clears the screen.
COPY Copies one or more files to the specified location.
CTTY Changes the terminal device used to control the computer.
DATE Displays or sets the current date.
DEL Deletes the specified files.
DIR Displays a list of the files and subfolders that exist in the current folder.
ERASE Deletes the specified files.
EXIT Quits the COMMAND.COM and returns to the previous program.
LH and LOADHIGH Loads a program into upper memory.
LOCK Enables direct disk access (allows storage and retrieval from disk without involving the CPU).
MD Creates a folder or subfolder.
MKDIR Same as MD.
PATH Specifies which folders Windows 95 should search for executable files.
PROMPT Changes the appearance of the command prompt.
RD and RMDIR Deletes a folder.
REN and RENAME Changes the name of a file or files.
SET Displays, sets, or removes environment variables.
TIME Displays or sets the current time.
TYPE Displays the contents of a text file.
UNLOCK Disables direct disk access.
VER Displays the operating system version number.
VERIFY Directs the operating system to verify that files are written correctly to a disk, and displays the status of verifications.
VOL Displays the volume label and serial number for a disk.

System Commands

Many of the familiar MS-DOS prompt commands, system files, and drivers are included in Windows 95. They are found in the Windows\Command directory. The following is a list of commands and related files not included in the basic Windows 95 command set. Some of these commands can be loaded from the Windows 95 CD and are found in the directory Other\Olddos:

  • ASSIGN
  • MIRROR
  • BACKUP
  • MONOUMB.386
  • CHKSTATE.SYS
  • MSAV
  • COMP
  • MSBACKUP
  • DOSSHELL
  • POWER
  • EDLIN
  • PRINT
  • EGA.SYS
  • PRINTER.SYS
  • EXPAND
  • QBASIC
  • FASTHELP
  • RAMDRIVE.SYS
  • FASTOPEN
  • RECOVER
  • GRAFTABL
  • REPLACE
  • GRAPHICS
  • RESTORE
  • HELP
  • ROMDRIVE.SYS
  • INSTUPP.BAT
  • SHARE
  • INTERLNK
  • SIZER
  • INTERSVR
  • SMARTMON
  • JOIN
  • TREE
  • LOADFIX
  • UNDELETE
  • MEMCARD
  • UNFORMAT
  • MEMMAKER
  • VSAFE

BOOTLOG.TXT

As mentioned earlier, this log contains information about the Windows 95 startup process. It is a good troubleshooting tool. The BOOTLOG.TXT file contains the following sections:

  • Loading real-mode drivers
  • Loading VxDs system-critical initialization of VxDs
  • Device initialization of VxDs
  • Successful VxD initialization
NOTE
VxD is a Windows virtual device driver-it replaces the real-mode drivers from MS-DOS. The x is a variable and stands for the type of device-for example, P for printer or D for display.

The following is an example of the first 10 lines of a BOOTLOG.TXT file:


Initialization Files

As explained in Tutorial 15, "Software: MS-DOS and Windows 3.x," .INI files were some of the most important files in earlier versions of Windows. In Windows 95, .INI files are not nearly as important as the Registry.

The Windows 3.1 .INI system included WIN.INI, which contained information about the appearance of the Windows environment including keyboard, mouse, and display options. The SYSTEM.INI file contained information related to hardware and device options including memory options, device drivers, and networking and resource-sharing parameters.

WIN.INI and SYSTEM.INI are still used by Windows 95 to run older Windows 3.x programs that are not supported by .VXD files. With time, the use of these files will diminish. They are not required by Windows 95; they simply provide backward compatibility.

TIP
If Windows 95 is installed in its own directory and not in the root directory of the hard disk, older versions of MS-DOS can still be run by setting the BootMulti= statement in the [Options] section of the Windows 95 version of MSDOS.SYS. Load the earlier version of MS-DOS by pressing F4 at the "Starting Windows" screen during system startup.

[Previous] [Contents] [Next]