There are two main ways that the system Registry can become corrupted: Updates to the Registry via one of the Registry editing tools or an import of a registry settings file, and by the files that make up the Registry becoming damaged or deleted.
There are many ways to import data into the Registry, but most of them involve storing settings in a file and importing that file into the Registry. If the settings in the file are incorrect, you might be able to just continue computing without any problems, or you could end up with a system that no longer boots normally. If your system will not boot normally, then your only option would be to boot the system by using an alternative method, such as the Recovery Console, and replace the base Registry files with an untainted version.
You'll also need to use an alternative method to boot the system if the Registry files on the drive itself have become corrupted, and then you'll have to replace the Registry files. The user portion of the Registry is found in your user profile directory and is named ntuser.dat. Your user profile directory is in C:\Documents and Settings\<username>. The system portion of the registry is found in %systemroot%\sysetm32\config, in the files SAM, SECURITY, system, and software.
In order to let you repair the operating system from within the operating system, Microsoft has provided Safe Mode. Safe Mode is available with Windows XP, Windows Server 2003, Windows Vista, and Windows 2000 and is a special boot of Windows that loads a minimal set of drivers. The only drivers that are loaded are the ones that are required to get the operating system running. Instead of loading the normal video driver, Safe Mode loads a 16-color VGA graphics driver. The config.sys and autoexec.bat files are skipped completely. If you have issues with drivers or driver configuration, then booting into Safe Mode can allow you to bypass these driver related problems, so that they can be fixed.
You can enter Safe Mode by pressing the F8 key when the operating system is booting up. If your computer boots into Safe Mode, the words "Safe Mode" appear in each corner of your desktop. If Windows XP fails to boot properly, then it will suggest, and attempt, to boot into Safe Mode on the next boot. If your computer boots into Safe Mode automatically, the last boot process was likely interrupted (usually by the user).
As with all things in life, some things cannot easily be categorized, so this section discusses errors that do not fit in the other categories in this tutorial.
Paging file or Swap file errors
The Windows swap file or paging file is a hard drive file that is used as additional RAM memory. Typically swap file is the name used to describe the file when working with Windows 9x, while with Windows XP the file is called the paging file or page file. The location of the paging file is recorded in the Registry. If the drive that contains the paging file becomes too full, you may encounter errors informing you of this fact. If this happens, create some additional space for the paging file by deleting some unnecessary files, reducing the size of the paging file, or moving the paging file to a new location. The default location for the paging file is in the same drive as your Windows directory. Windows XP allows you to move the paging file to an alternate drive. If you have done so, and that drive has been removed from your system, you encounter errors telling you that the paging file could not be created.