Lesson 3: How Windows 95 Works

[Previous] [Next]

The first two lessons in this chapter gave you an overview of Windows 95. We looked at what makes it different from its precursors and described its distinguishing features. This lesson lets you see take a look "under the hood" and presents the basics of how the Windows 95 operating system works. It is not a complete course, but it is intended to give you a firm background in the operation of Windows 95.

After this lesson, you will be able to:

  • Identify the various parts of Windows 95.
  • Define the principles of the Windows 95 Registry.
  • Back up the Registry.
  • Identify the basics of Plug and Play technology.
Estimated lesson time: 40 minutes

The Windows 95 File Structure

As mentioned earlier in this chapter, 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.

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 chapter. Now let's take a look at what makes them tick.


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:


IO.SYS also includes the following commands:

  • dos=high
  • files=
  • lastdrive=
  • buffers=
  • stacks=
  • shell=
  • fcbs=

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.


As mentioned earlier in the chapter, 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.

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


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.


  • 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.


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


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:

  • MONOUMB.386
  • MSAV
  • COMP
  • HELP
  • JOIN
  • TREE

    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

    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:

     [000B346F] Loading Device = ATAPICD.SYS [000B3482] LoadSuccess = ATAPICD.SYS [000B3482] Loading Device = C:\WINDOWS\HIMEM.SYS [000B3484] LoadSuccess = C:\WINDOWS\HIMEM.SYS [000B3484] Loading Device = C:\WINDOWS\IFSHLP.SYS [000B3485] LoadSuccess = C:\WINDOWS\IFSHLP.SYS [000B3485] Loading Device = C:\WINDOWS\SETVER.EXE [000B3486] LoadSuccess = C:\WINDOWS\SETVER.EXE [000B348D] C:\PROGRA~1\MCAFEE\VIRUSS~1\SCANPM.EXE[000B348D] starting [000B34D2] Loading VXD = VMM 

    Initialization Files

    As explained in Chapter 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.

    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.

    The Registry

    As explained in Lesson 1, the Registry is a common database composed of two binary files: SYSTEM.DAT and USER.DAT, which are located in the Windows directory. Inside the Registry is information on all the hardware in the computer, network information, user preferences, and file types, as well as virtually anything else you might run into within Windows 95.

    The Registry is intended to replace CONFIG.SYS, AUTOEXEC.BAT, and every .INI file. However, Windows 95 still reads all .INI files at boot up for backward compatibility with Win 3.x programs that need them.

    Why the Change in Windows 95?

    Windows 3.1x supported two kinds of .INI files: system initialization files and private initialization files. System initialization files controlled the Windows environment and included SYSTEM.INI and WIN.INI. Private initialization files included CONTROL.INI, PROGMAN.INI, WINFILE.INI, and PROTOCOL.INI, as well as any application .INI files. Initialization files created a bridge between the application and the Windows operating environment.

    In addition to .INI files, Windows 3.1 used a host of other text files to manage operations. The files included AUTOEXEC.BAT and CONFIG.SYS. It was conceivable for a user to have more than 150 files responsible for the operation of the computer and the Windows environment.

    During the development of Windows 3.11, it became apparent that a move away from the .INI files was needed. A new file type was introduced into the programming environment. The file was called REG.DAT and was the precursor to the Windows 95 Registry. REG.DAT included information used for drag-and-drop operations, object linking and embedding (OLE), and establishing associations between data files and their programs.

    The binary file REG.DAT was bundled with its editor, REGEDIT.EXE. While this began the process of centralizing computer operations, REG.DAT came with some serious size limitations. It could not exceed 64 KB, which is the same limit established for the .INI files in Windows 3.11.

    Accessing the Registry

    The recommended way to access the Registry is through the Control Panel. It lets a user modify settings with an easy to use interface that never even mentioned the word Registry. In Windows 3.x, most such changes required modifying the SYSTEM.INI file.

    Everything necessary to configure the system so that it will work can be handled from the Windows 95 Control Panel. The three areas where Windows 95 preferences/settings can be viewed and configured are the Control Panel, the System Monitor, and the Registry.

    Directly changing an entry (to be done only by a knowledgeable user) is accomplished with the Registry Editor, REGEDIT.EXE. To open it, type REGEDIT at a command prompt. This can be obtained by typing the command in the dialog box that appears when you choose Run from the Start menu. The Registry itself is stored in binary format, so you can't open, view, or edit the contents directly.

    Microsoft tried to make the Registry as inaccessible as possible. The fact that the Registry is the central repository creates its principal weakness—once it has been corrupted, it's hard to recover settings if they haven't been backed up.

    The Registry is stored in three locations:

    • SYSTEM.DAT: Stores most of the data, including the majority of hardware and software configurations.
    • USER.DAT: Stores data about a particular user.
    • The Virtual Registry: Consists of a host of files that are created by Windows 95 when the system is started up. They are stored in RAM. These settings relate to many of the performance-monitoring tools such as PVIEW.EXE.

    Components of the Registry

    The Windows 95 Registry consists of six root keys, each of which reflects a different aspect of the configuration. Each key or branch of the Registry groups information that logically belongs together. All top-level keys are called root keys and defined and named by Windows 95. These cannot be changed. Root keys are named HKEY_XXX and can be followed by several subkeys. All other keys in the Registry are subkeys of these six primary keys. Subkeys can be added, deleted, or renamed. The six root keys are shown in Figure 16.5 and are explored in the following sections.

    Figure 16.5 Registry root keys


    This section of the Registry defines the standard-class objects used by Windows 95. Do not make any changes to this section. This is a link to the HKEY_LOCAL_MACHINE\SOFTWARE\Classes, which simply provides compatibility with the Windows 3.1 registration database. This compatibility is important if you want to run Windows 3.1 16-bit applications in Windows 95.


    This section defines the current user settings—it's not important for repairing computers. Personalized information like fonts, some icons, and colors can be changed here. This is a link to the HKEY_USERS key. This key provides Windows 95 compatibility to applications using the Windows NT Registry structure.


    This portion of the Registry contains all the data for the system's non-user-specific configurations (including every device in the computer). This is the largest key in the Registry and the place you will perform the bulk of your system edits to optimize Windows 95 performance. Information stored here includes hardware configuration, peripheral devices, installed software, OLE compatibility, software configuration, and Windows 95 configuration. The data stored in HKEY_LOCAL_MACHINE is stored in the SYSTEM.DAT file.


    This section of the Registry is where Windows 95 keeps track of the different user settings. If your computer is not configured for multiple users, you will have a single subkey named DEFAULT. If your computer has been configured for multiple users, two profiles are created when you log on: HKEY_USERS\.DEFAULT and HKEY_USERS\user name\user.dat. If it's a two-user system, the other user's settings are held in memory. This makes it impossible to alter user settings without logging on under their name and password.


    This key handles Plug and Play and contains information about the current configuration of a multiple-hardware-configured computer. This key works in conjunction with HKEY_LOCAL_MACHINE\Config\xxxx, where xxxx is the subkey that represents the numeric value of the current hardware configuration.


    This is Registry data that is stored in RAM to speed up system configuration. A snapshot of all hardware in use is stored here. It is updated on boot up and when any changes are made in the system configuration file. This portion of the Registry is dynamic. It's where virtual device drivers are installed, where Plug and Play hardware information is maintained, and where performance statistics are calculated. Because this information is accessed and changed constantly, this portion of the Registry is never written to the hard disk. It resides in the computer's RAM.

    Editing the Registry

    Editing the Registry directly can cause serious problems if it is not done correctly. Windows 95 provides the Control Panel and Properties sheets for editing the Registry. Microsoft recommends these methods. Microsoft does not support direct editing of the Registry.

    If you feel you must edit the Registry, then back up first (see the end of this section for details on backing up the Registry). The tool used to edit the Registry is REGEDIT.EXE. (See Figure 16.6.) This program is not included in any of the menus and will not be found on the desktop. You must either activate REGEDIT.EXE through Windows Explorer or start the program from the command line.

    click to view at full size.

    Figure 16.6 REGEDIT

    The following table provides an overview of the commands in the REGEDIT.

    Menu Commands
    Registry Import Registry File: Allows you to take a Registry file that you've created or modified and import it into the current Registry. Importing a Registry file is often the best way to rescue a corrupted Registry or to replace the current damaged Registry with a known good backup.

    Export Registry File: Allows you to export the Registry file to a floppy disk or network location. Exporting a Registry is one of the best ways to back up your Windows 95 system.

    Connect Network Registry: Allows you to connect to a user on your network and, if you have the proper authority, modify that user's Registry. This is a very powerful feature, not necessarily one that a majority of users should have access to.

    Disconnect Network Registry: Releases the connection to a network user's Registry.

    Print: Allows you to print either the entire Registry, or just one of the keys or branches in the Registry.

    Edit New: Allows you to create keys and assign values.

    Delete: This command allows you to delete a key, key value, or value name.

    Rename: This command lets you rename either a key or value name.

    Find: Allows you to find a particular string or key value name.

    Find Next: Finds the next value that was defined in the Find command.

    View Status Bar: Either hides or shows the status bar at the bottom of the screen.

    Split: This command lets you move the split bar (vertical separation) between the Key window (on the left) and the Value window (on the right).

    Refresh: This command refreshes the REGEDIT screen.

    The Edit command doesn't include the typical Copy, Cut, and Paste options. If you need to copy and paste in REGEDIT, you will need to use the Windows keyboard commands. Press CTRL+C for Copy, and CTRL+V for Paste. These two commands are a necessity if you do a lot of searching and replacing in the Registry.

    REGEDIT's Dual Purpose

    REGEDIT is more than a Windows utility program. It can be used from inside real-mode MS-DOS. This is particularly important if you have a seriously corrupted Registry file and Windows won't start. During installation, Windows 95 puts a copy of REGEDIT.EXE on the startup disk. When running REGEDIT in real mode, it doesn't have an interface—it uses a command-line format to carry out instructions. The following table lists the most common REGEDIT switches.

    Switch Function
    /? Displays the REGEDIT command-line syntax.
    /L:system Provides the location and filename of SYSTEM.DAT.
    /R:user Provides the location and filename of USER.DAT.
    /E filename <regpath> Creates a Registry (.REG) file.
    /C filename Replaces the entire Registry with the contents of your .REG.

    To use REGEDIT in real mode, you'll need to tell it where your SYSTEM.DAT and USER.DAT files are located, if they are in a directory other than Windows.

    Here is the syntax needed to replace an existing, corrupt Registry with the contents of the .REG file you created. Remember, this command is typed in full at the MS-DOS prompt:

     REGEDIT [/L:system] [/R:user] /C filename 

    Using REGEDIT to Modify the Registry

    Before modifying the Registry, make sure it is backed up sufficiently. When you edit the Registry, consider using the Control Panel and the applications contained inside of it to make Registry edits. The Control Panel is the wizard for updating specific parts of the Registry. A corrupted Registry is not something you can easily recover from.

    Edits to the Registry can be made using either the menu or the right mouse button. Adding keys can be accomplished by simply right-clicking the key you want to add to and entering your information. Windows 95 has two restrictions you need to be aware of when adding keys:

    • You cannot add a top-level key. Windows 95 creates those.
    • Within a parent key, each subkey name must be unique. You can use the same subkey name in different parent keys.

    Modifying the value section of the Value entry can be accomplished with a double-click on the value in the Value window. After you double-click the value, you will see one of three different dialog boxes.

    Windows 95 uses multiple registers for multiuser operations, and it can be difficult to know exactly where pieces of information are stored. The System Policy Editor allows administrators to locate where information is stored.

    Backing Up the Registry

    Backing up the Windows 95 Registry is one of the most important parts of maintaining a personal computer. Because the Registry is so undocumented, the only way to recover from Registry errors is by restoring the Registry data. A corrupt Registry can disable a few components of a particular piece of software, or it can prevent Windows from booting. Microsoft has provided a number of different tools to back up the Registry. No single tool offers the total solution, but if used in combination they can provide a very effective backup strategy.

    Every time you add a piece of software, adjust a system component, or make a new connection, the Registry is changed. The Registry is extremely dynamic and needs to be backed up any time it is changed.

    There are three primary Registry backup tools available in Windows 95:

    • Microsoft Configuration Backup (CFGBACK.EXE)
    • Emergency Recovery Utility (ERU.EXE)
    • .REG files

    Microsoft Configuration Backup (CFGBACK.EXE)

    CFGBACK.EXE (Microsoft Configuration Backup) is a proprietary program that creates backups that can be restored only from inside this program. CFGBACK allows you to create up to nine iterations, or different backup files, of a Registry. Once the program is installed, start it and choose the option you want to execute: Backup or Restore. One nice feature of CFGBACK is that it allows you to write a description of why the backup was run (for instance: "Before MSOffice installation" or "After MSOffice installation"). See Figure 16.7.

    Figure 16.7 CFGBACK.EXE

    Configuration Backup is available in two places: on the Windows 95 CD in the folder \Other\Misc\CFGBACK, or on the CD included with the Windows 95 Resource Kit. Either way, you need to load the file from the CD to your Windows 95 system before you can use it.

    The limitations of CFGBACK.EXE include the following:

    • If a Windows 95 system has multiuser settings, CFGBACK.EXE will not back up the separate user settings.
    • CFGBACK.EXE will not help if Windows 95 itself cannot start. CFGBACK.EXE runs inside Windows 95, not in MS-DOS real mode. One of the best ways to bring your system back from a Windows boot-up failure is to use the .REG files created using REGEDIT.

    Emergency Recovery Utility

    The Emergency Recovery Utility (ERU.EXE) is available on the Windows 95 CD in the folder \Other\Misc\Eru. The ERU.EXE program backs up all critical system files, including AUTOEXEC.BAT, COMMAND.COM, CONFIG.SYS, IO.SYS, MSDOS.SYS, PROTOCOL.INI, SYSTEM.DAT, SYSTEM.INI, USER.DAT, and WIN.INI.

    ERU.EXE also creates an MS-DOS real-mode file, called ERD.EXE, that you can use to restore from MS-DOS if the Windows system fails to start up.

    The limitations of ERU.EXE include the following:

    • When backing up to a floppy disk, ERU.EXE determines the amount of space available to perform the backup. If the disk doesn't contain enough space, it will simply not back up one of the components. Unlike the old MS-DOS BACKUP command, which could back up over multiple diskettes, ERU.EXE can back up only to a single floppy disk.
    • On a multiuser system, ERU.EXE fails to create a backup of Registry settings related to the current user.
    • If ERU.EXE can't find a file it is trying to back up, it will hang without giving you an error message. You are left on your own to try to figure out the problem. If it hangs, however, you can usually assume that you're missing one of the files that it's trying to back up.

    Using .REG Files

    One of the features of REGEDIT is its ability to export Registry information. By creating a .REG file that backs up your entire system, you can easily restore a Registry. To rescue a Registry, you use either REGEDIT in Windows or the real-mode REGEDIT found on your Rescue disk.

    If you don't know where your Windows 95 Rescue disk is, you can re-create it by doing the following: Go to the Control Panel and click the Add/Remove programs applet. Inside the applet, click the Startup Disk tab and follow the instructions.

    Additional Restore Techniques

    Windows 95 comes with at least two other techniques you can use to restore your system. Often, these techniques are the quickest ones available to you, and offer the easiest solution.

    The first technique is to let Windows try to restore your Registry. Give that a try if, during boot, you see the message shown in Figure 16.8.

    click to view at full size.

    Figure 16.8 Registry problem

    Remember what the message says: "Restoring the Registry will replace the faulty Registry with a known good backup copy. However, this backup copy may not contain all of the information recently added to your system."

    The second technique is to restore the Registry in MS-DOS mode by replacing the SYSTEM.DAT and USER.DAT files. Follow these steps:

    1. Click the Start Button and select Shut Down.
    2. In the Shut Down dialog box, select Restart The Computer In MS-DOS Mode.
    3. After you're in MS-DOS mode, make sure you're in the Windows directory. You can change directories (folders) by typing:
    4.  cd \windows 

    5. Next type each of these commands as they appear in this order:
    6.  attrib -h -r -s system.dat attrib -h -r -s system.da0 copy system.da0 system.dat attrib -h -r -s user.dat attrib -h -r -s user.da0 copy user.da0 user.dat 

    These commands will change the Registry files from hidden read-only to non-hidden read/write files and then replace the original Registry files with the backup files.

    1. Restart your computer.

    Registry Restored But Windows Problems Remain

    Not all Windows problems are attributable to a corrupt or bad Registry. Some problems relate to erroneous entries in either the SYSTEM.INI or WIN.INI files. Not everything critical to your system is stored in the Registry.

    When backing up a Registry, you should also back up SYSTEM.INI and WIN.INI. If you get one of the following two error messages, it is possible that the problem lies elsewhere besides the Registry or the .INI files:

     Registry File Was Not Found Invalid Vxd dynamic link call from IFSMGR (03) 

    It could be that you have a missing or bad MSDOS.SYS file. If you receive one of those error messages, find your Startup disk and copy the MSDOS.SYS file from the disk to your Windows directory.

    Last Resort Before Reloading Windows 95

    When it was originally set up on your computer, Windows created another SYSTEM.DAT file during installation called SYSTEM.1ST. If you want, you can reload SYSTEM.1ST using the following real-mode commands:

     attrib -r -h -s system.dat attrib -r -h -s system.1st copy system.1st system.dat 

    If none of these solutions work, you'll need to reload Windows.

    Windows Registry

    The Windows Registry is very complex, and we have touched only on some of its more important aspects. To learn more about the Registry and how to edit it, we suggest you add the following text to your technical library: Inside the Registry for Microsoft Windows 95, Gunter Born, Microsoft Press, 1997.

    Device Drivers in Windows 95

    From a developers standpoint, the ideal way to run drivers is in protected mode in Windows 95. These virtual device drivers, which have the extension .VXD, will work for most every device driver commonly found in the MS-DOS CONFIG.SYS and AUTOEXEC.BAT files.

    Double-buffering and the HIMEM.SYS, SMARTDRV.EXE, SETVER.EXE, and IFSHLP.SYS programs and files are all loaded from within IO.SYS. Microsoft also provides protected-mode drivers for a broad cross section of peripheral devices.

    When Windows 95 installs, it looks for real-mode drivers in CONFIG.SYS and AUTOEXEC.BAT that it can replace. The list of device drivers that can be safely replaced is stored in the text file IOS.INI (located in the Windows directory).

    There are roughly 300 device drivers that Windows 95 can replace, and about 300,000 device drivers that Windows 95 has never heard of. These real-mode device drivers must run, or the device they support will not operate. That is why CONFIG.SYS, SYSTEM.INI, and AUTOEXEC.BAT files still exist.

    Virtual Device Drivers vs. Real-Mode Drivers

    There are several reasons for eliminating real-mode drivers from the Windows memory stack:

    • Real-mode drivers are 16-bit drivers. For the most part, they are slower than 32-bit drivers (although a well-written 16-bit driver can out-perform a poorly-written 32-bit driver).
    • Windows 95 runs in protected mode. To use a real-mode driver, Windows must switch between real mode and protected mode (this is time consuming).
    • Real-mode drivers must reside in conventional or upper memory, thus utilizing valuable resources (virtual drivers don't).
    • The processor has no built-in protection for real-mode drivers.

    Windows 95 includes VxDs (virtual device drivers) to replace the following Windows 3.x real-mode components:

    • FAT file system (VFAT.VXD)
    • CD-ROM file system (CDFS.VSD)
    • SMARTDrive disk cache (VCACHE.VXD)
    • Mouse driver (VMOUSE.VXD)
    • Network protocols
    • SHARE.EXE MS-DOS file sharing and locking support (VSHARE.VXD)
    • Disk device drivers including SCSI devices

    Plug and Play

    The ultimate goal of any computer user is to be able to simply plug any device into a computer, turn it on, and have it work. This is the concept upon which Plug and Play is founded. A well-designed Plug and Play system would eliminate the need for jumpers, switches, and installation software. Does Plug and Play work? The answer is a resounding yes and no. In order for Plug and Play to work, the system must have three things:

    • A Plug and Play BIOS
    • A Plug and Play device
    • A Plug and Play operating system (such as Windows 95)

    Windows 95 uses the Configuration Manager (CONFIGMG.VXD) to collect BIOS information and manage the assignment of IRQ, DMA, and other settings. During each startup, the Configuration Manager searches the system for all information, checks for conflicts, and reconfigures as necessary to resolve conflicts. Any time a new device (without a driver) is detected, the Configuration Manager launches the necessary wizard to configure the device. When all is well, it simply asks for confirmation of the device and how it is to be configured. When Plug and Play doesn't work or there is a problem, the solution is usually in the Device Manager.

    Device Manager

    As mentioned, all Windows 95 information is stored in the Registry. The Device Manager provides a graphical view of all the devices on a computer. This is the place to find and resolve hardware problems. The Device Manager allows you to make many changes to the hardware configuration of a computer, including:

    • Add or remove a device.
    • View devices by IRQ, I/O port, and DMA channel.
    • Print system reports.
    • View individual device properties.
    • Adjust a device's resources.
    • Change drivers.
    • Adjust settings.

    To display the Device Manager, select Start, select Settings, then select Control Panel, and open the System icon. You can also right-click My Computer and select Properties from the context menu. (See Figure 16.9 for the Device Manager.)

    click to view at full size.

    Figure 16.9 Device Manager

    To see a specific device, click on the plus sign (+) to the left of the device class. (See Figure 16.10.) Any time Windows 95 sees a conflict, it denotes the device with a red X or a yellow exclamation point.

    click to view at full size.

    Figure 16.10 Device Manager expanded

    To see a list of all IRQ and DMA channels, right-click My Computer to get Properties, click on the panel marked System Manager, and then click on the Properties dialog box below that to get the IRQ, as shown in Figure 16.11.

    click to view at full size.

    Figure 16.11 Computer properties

    To document a system, select the Print command button from the Device Manager window, then select the type of printout you want (system summary, selected class or device, all devices and system summary), shown in Figure 16.12.

    click to view at full size.

    Figure 16.12 Print system summary

    To view the details of an individual device, select the device and select the Properties button at the bottom of the window. Many setup options can be changed from this screen.

    If the device is not Plug and Play-compliant, the changes will also need to be made on the device itself.

    To remove a device, simply select it from the Device Manager and click the Remove button at the bottom of the Device Manager screen. Don't forget to turn off your computer and physically remove the device from the system.

    Adding New Hardware

    Adding new hardware is simple—it will follow one of two processes, depending on whether or not the device is Plug and Play. Both processes use the Hardware wizard. With Plug and Play, this wizard is launched automatically when Windows detects the new device during startup. With a non-Plug and Play device, you have to start the wizard manually by using the Add New Hardware icon in the Control Panel. When installing manually, Windows asks if you want to specify the device or let Windows find it. In most cases, Windows does a good job of finding it; however, if you know the device and have the manufacturer's software for installation, it is often better to tell Windows what to do.

    Installing Printers

    Installing printers is similar to installing any other device. However, since several printer drivers can be installed and chosen at will from inside an application, Windows 95 uses a special wizard for printers. Printers also use standard ports (LPT1 or LPT2); therefore, setting the IRQs and I/O addresses is not an issue. A new Plug and Play printer is perhaps as close to true Plug and Play as possible. Simply plug the printer into a parallel port, turn on the printer, and boot up the computer. Windows 95 will recognize the printer (by polling the ports during startup) and launch the Install wizard. In many cases, you merely confirm that Windows has recognized the correct printer and it will do the rest.

    For a non-Plug and Play printer, simply select the Add Printer icon from the Printers folder in the Control Panel. You will be asked to select the printer from a list. If the printer is not on the list, you will need to use the Have Disk option and supply the software. Options can vary depending on whether you are connecting to a network or a local printer.

    Configuration Tips for Windows 95

    Windows 95 is less difficult to configure than Window 3.x. The Windows 95 operating system automatically handles disk caching as well as many other configuration settings. Here are a few things to watch for when configuring Windows 95.

    Make a Bootable Disk

    A bootable floppy disk is just as important in Windows 95 as it is for MS-DOS. Use the Add/Remove Programs window in the Control Panel to create a startup disk. Bootable disks can also be made from the MS-DOS prompt (format a: /s) or by formatting from Windows Explorer (the Windows 95 equivalent to File Manager), just as in MS-DOS and Windows 3.x. Making a startup disk is a good idea, because the process will also copy many of the utility files used by a computer professional.

    Memory Management—Support of MS-DOS Applications

    DOS 7 provides built-in, protected-mode support for the main conventional device drivers such as Smartdrv, Mscdex, and the mouse. Even with this, there are still plenty of systems that need more memory to support MS-DOS applications as well as Windows 3.x programs. For example, you might encounter an office or small business that is still using an MS-DOS-based accounting system. To run this program on their new Windows 95 computers will require you to put extra effort into memory management to ensure that sufficient RAM is configured and available for this software.

    PIF Files

    Windows 95 no longer creates .PIF files by using the PIF editor. PIF settings are created by accessing the Properties value when a MS-DOS application is right-clicked. The major areas of concern for MS-DOS applications are the memory functions. Unlike the old PIF editor, Windows 95 now uses an Auto function. In theory, this means that Windows 95 automatically detects the amount of memory needed and allocates it. What usually happens is that all memory is reported to the program as available, whether the program needs it or not. Just as in the old Windows 3.x days, a lot of memory can be saved by giving the MS-DOS application only what it needs.

    If the system says there is no expanded memory, it is because the NOEMS option in the CONFIG.SYS file has been added. If expanded memory support is needed in Windows 95, use EMM386 and be sure to use the RAM option. For example, use a statement like the following in CONFIG.SYS:


    MS-DOS Mode

    Windows 95 has the new MS-DOS mode that allows creation of custom CONFIG.SYS and AUTOEXEC.BAT files for tough MS-DOS applications. You can create a custom CONFIG.SYS and AUTOEXEC.BAT for any MS-DOS application but there is one problem. To run a program in MS-DOS mode, Windows 95 reboots the computer. It is better to create a good CONFIG.SYS that allows running the MS-DOS program without rebooting. Use the same memory management for Windows 95 that is used for MS-DOS and Windows 3.x. Running in MS-DOS mode is different from running in an MS-DOS session. In the MS-DOS mode, you will have to configure real-mode drivers for your mouse, CD, sound card, etc., just as you had to do with MS-DOS and Windows 3.1.

    New Options in CONFIG.SYS

    Although CONFIG.SYS is, in theory, no longer needed, Microsoft has added new options that give CONFIG.SYS some power in memory management.

    Remember Windows (DOS 7) automatically loads the following commands and files:

    • SETVER
    • DOUBLESPACE and/or DRVSPACE (if needed)
    • DBLBUFFER for disk cache (if needed)

    You can save approximately 10 KB by loading only the options needed. Only HIMEM.SYS and SETVER are needed, so create a CONFIG.SYS file and add the following:


    NOAUTO means "Do not autoload the drivers." If you use NOAUTO, be sure to add HIMEM.SYS and IFSHLP.SYS to the CONFIG.SYS file or it will lock up the computer.

    Caching and Swap Files

    Windows 95 has excellent built-in caching support for both the hard drives and CD-ROMs. It also has better support for virtual memory. Neither the cache nor the swap file are locked in size as they were in Windows 3.x. Their only drawback is that they use up a lot of hard disk space.

    When configuring Windows 95, two areas need to be checked to improve the use of hard disk drive space when caching and using virtual memory. They are the File System and Virtual Memory options found in the System icon in the Control Panel. The two options are at the bottom of the System Performance window.

    Setting Up Proper Caching and Performance Enhancement

    Using a cache is a typical method of increasing performance. We saw in Chapter 7, "Memory," how a cache improves the performance of memory and CPU processing. There are two ways in which you can increase the performance of your drives through caching. The first is to properly set up your VCACHE, and the second is to tune your drives' cache. You can also increase performance by properly setting your swap file size.


    The VCACHE that comes with Windows 95 is quite different from that which comes with Windows 3.x. The big difference is that the cache is "sized dynamically." As Windows needs more RAM, it takes away from the cache and vice-versa. Unfortunately, the cache-sizing algorithms are very slow, especially when used with the swap file. Therefore, the swap file needs to be limited in size. Windows does not allow any direct control over the VCACHE settings for the hard disk drive. The SYSTEM.INI commands can be changed to limit this. To set the best VCACHE size, type the following in the [386Enh] section:


    where X is one-fourth the size of your RAM, expressed in kilobytes.

    Tuning the Hard Disk Drive Cache

    Tuning the hard disk drive cache is a simple process. Access the System properties (the same way as for the Device Manager) and select the Performance tab. From this window, select the File Systems button at the bottom.

    There are now three tabs to choose from for File System Performance: Hard Disk, CD-ROM, and Troubleshooting.

    The Hard Disk Tab

    This tab selects the role of the machine. (See Figure 16.13.) Choose the most common role for the computer and select OK.

    click to view at full size.

    Figure 16.13 Hard Disk tab

    The following choices are available on the Hard Disk tab:

    • Desktop Computer: Typical for a desktop computer; assumes there is more than the minimum required RAM. Don't select this if you want improved system performance.
    • Mobile or Docking System: This configuration assumes a minimum amount of RAM and that the computer is running on batteries.
    • Network Server: This configuration assumes there is more than 16 MB of RAM and frequent hard disk access. This system is optimized for increased hard disk activities. Select this to improve system performance.

    The CD-ROM Tab

    The Windows settings for CD-ROMs are fine as long as you are willing to give up a lot of hard disk drive space to the CD cache. Try setting the CD-ROM to a lower setting by trying the Double-Speed Drives setting for all drives. (See Figure 16.14.) Unless you run a lot of video from your CD-ROM drive, you will not notice any difference in CD performance and will get back a megabyte of hard drive space.

    click to view at full size.

    Figure 16.14 CD-ROM tab

    The Troubleshooting Tab

    This tab is for advanced users only. (See Figure 16.15.) It allows the user to disable several functions, therefore helping the troubleshooter isolate problems.

    click to view at full size.

    Figure 16.15 Troubleshooting tab

    Setting Up the Swap File

    Access the Virtual Memory option on the System Properties window. This option sets the optimal swap-file size, shrinks the information file that tells MS-DOS 7 how to boot up, and tells the computer which drive and directory to use for the swap file. Learning these options will help you time and time again.

    The "Let Windows manage my virtual file settings (recommended)" option is fine, provided you have the hard disk drive space to spare. Windows 95 will shrink the swap file if you need to save data to the drive, but very slowly. Also, Windows 95 seems to occasionally save data to the swap file even when there is plenty of room to load it in physical memory. Windows 95 does not even use all of the allocated swap file.

    Set the swap file manually to get better performance. Use the following table as a guideline:

    Available RAM Swap File Size
    4 MB 30 MB
    8 MB 25 MB
    16 MB 15 MB
    24 MB 10 MB
    32 MB 8 MB
    32 MB None unless required by an application

    Lesson Summary

    The following points summarize the main elements of this lesson:

    • MS-DOS 7, which comes with Windows 95, still uses the same three system files—IO.SYS, MSDOS.SYS, and COMMAND.COM—however, their functions are somewhat different.
    • The principal visible difference between Windows 95 and Windows 3.x is the new GUI.
    • The Registry is the principal operational difference between Windows 95 and earlier versions of Windows.
    • The Registry is stored in three file locations: SYSTEM.DAT, USER.DAT, and the virtual registry.
    • The Registry can be directly edited using REGEDIT.EXE, however, doing this is not recommended.
    • Microsoft provides three ways to back up the Registry—Microsoft Configuration Backup (CFGBACK.EXE), the Emergency Recovery Utility (ERU.EXE), and REGEDIT.EXE. Each has its own advantages and limitations.
    • The Device Manager is the key to managing the hardware on a Windows 95 system.

    Microsoft Corporation - A+ Certification Training Kit
    Microsoft Corporation - A+ Certification Training Kit
    ISBN: N/A
    EAN: N/A
    Year: 2000
    Pages: 127

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net