Windows 9xMe Registry

 < Day Day Up > 

Windows 9x/Me Registry

If you use Windows 9x/Me at the office and at home, you probably notice a lot of differences between the systems, such as screen resolution and color depth settings, installed programs, and so forth.

The primary files used to keep track of the system configuration are

  • System.dat Stores computer-specific configuration information

  • User .dat Stores user-specific configuration information

Windows Me adds a third configuration file:

  • Classes.dat Stores file types and association information (stored in System.dat in Windows 9x)

Collectively, these files form the Windows Registry, the central location where almost everything that's important about how Windows 9x/Me works, as well as the programs and hardware installed for use with Windows, are stored.

These files are found in the default \Windows folder, but because they're system files, they're hidden by default. Unlike Config.sys or Msdos.sys , these files can't be edited or viewed with a simple text editor like Notepad. Instead, Windows uses the Regedit program (see Figure 18.2, later in this section) to view and change the contents of the Registry. To start Regedit, click Start, Run, type regedit , and press Enter.

Figure 18.2. Regedit is being used to view the display settings for the current configuration.

graphics/18fig02.gif

Changes made in Regedit are automatically saved when you exit. Under most normal circumstances, the Registry will not need to be edited or viewed. However, Registry editing might be necessary under the following circumstances:

  • To add, modify (by changing values or data), or remove a Registry key that cannot be changed through normal Windows menus or application settings. This might be necessary to remove traces of a program or hardware device that was not uninstalled properly, or to allow a new device or program to be installed.

  • To back up the Registry to a file.

caution

graphics/caution_icon.gif

The Registry should never be edited unless a backup copy has been made first, because there is no Undo option for individual edits and no way to discard all changes when exiting Regedit.


There are five different sections to the Windows Registry, whether it's the Registry used by Windows 9x/Me or the Registry used by Windows NT 4.0/2000/XP:

  • HKEY_CLASSES_ROOT Linksfile extensions to specific applications installed on the computer (also stored in HKEY_LOCAL_MACHINE )

  • HKEY_CURRENT_USER Stores configurations specific to the current user, such as screensaver, desktop theme, and Microsoft Office user information (also stored in HKEY_USERS )

  • HKEY_LOCAL_MACHINE Stores hardware and software setup information

  • HKEY_USERS Stores user-specific information for all users of this computer

  • HKEY_CURRENT_CONFIG Stores the settings for the current hardware profile (also stored in HKEY_LOCAL_MACHINE )

As you can see from this listing, any setting in Windows is stored in one of two top-level keys ( HKEY_LOCAL_MACHINE and HKEY_USERS ). The other three keys provide shortcuts to sections of these two keys.

Microsoft's online Knowledge Base provides numerous examples of using a Registry editor to make manual changes. Figure 18.2 shows a typical Windows 9x Registry, as viewed in Regedit. The left window displays keys, which are displayed as folders. Click a key to open it in the right window. A key can contain multiple values and data, as shown here.

You should edit the Registry only with careful instructions from a software or hardware vendor and only if other alternatives for solving a problem do not exist.

Follow these steps to back up the Registry to a text file:

  1. Start Regedit (click Start, Run, type Regedit , click OK).

  2. Click Registry.

  3. Click Export Registry.

  4. Select a folder for the Registry backup.

  5. Enter a name for the backup.

  6. Select All to back up the entire Registry.

  7. Click Save.

As you can see, the Registry is a vital part of Windows: Break the Registry by erasing its files or corrupting its contents, and you've broken Windows. One of the major differences between Windows 95, 98, and Me is how these operating systems help you recover from Registry problems.

Windows 95 makes a backup of the Registry files ( System.dat and User.dat ) after every start as System.da0 and User.da0 . If you can't start Windows, you can recover using the following method:

  1. Start your system with the Safe Mode command prompt option.

  2. Change to the C:\Windows folder ( CD\Windows ).

  3. Use the Attrib command to remove the read-only, hidden, and system attributes from System.dat and User.dat ( Attrib r h s System.dat ; Attrib r h s User.dat ).

  4. Use these commands to replace the damaged Registry files with the backups ( Copy System.da0 System.dat ; Copy User.da0 User.dat ). Answer Y when prompted to overwrite the existing file.

  5. Use Attrib to restore the correct file attributes to the new System and User files ( Attrib +r +h +s System.dat ; Attrib +r +h +s User.dat ).

  6. Restart the computer.

The Windows 95 method is clumsy, not very intuitive ( Attrib 's switches always twist my fingers in knots), and prone to error. (Make sure you replace .dat with .da0, not the other way around!) However, it works, assuming you have a good backup.

However, if you start Windows, have a problem with the Registry, restart Windows, and have a problem again, you've just replaced the good Registry you had two startups earlier with a problem Registry!

Windows 98 and Windows Me solve this problem by making multiple backups of the Registry and checking the Registry at startup with Scanreg .

Scanreg automatically runs whenever you restart your computer to check your Registry for problems; if any problems are detected , the latest backup copy of your Registry is used instead of the primary copy.

What if the latest backup of the Registry is also corrupted? Don't panicWindows 98 and Me store five Registry backups by default in the hidden \Windows\Sysbkup folder. The backups are compressed using Windows's own .CAB (cabinet) format, and are numbered rb000 through rb004 (oldest to newest); by default, a backup is made once a day. To restore from an older Registry backup, boot Windows 98 with the Command Prompt Only option or start Windows Me with the Windows Me EBD and change to C: drive, and type Scanreg/restore at the command prompt. Select a backup to restore, remove the EBD (if used) and restart the system after completing the restoration process.

graphics/note_icon.gif

Scanreg replaces a defective Registry with a backup copy if errors are detected, but it does not remove Registry entries for programs that are no longer on the system.


 < Day Day Up > 


Absolute Beginners Guide to A+ Certification. Covers the Hardware and Operating Systems Exam
Absolute Beginners Guide to A+ Certification. Covers the Hardware and Operating Systems Exam
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 310

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