Backing Up and Restoring the Windows
Registry
It is always wise to back up your registry before making
any changes to it.
This applies, especially, to the novice or to anyone who
isn't certain of the effects the changes being made will have on the operating
system.
One little mistake with reg editing can take down Windows to the
point of not being able to boot. Backing up the registry before editing
makes any errors you make repairable and thus registry editing becomes safe,
rather than risky.
There are several ways to backup the registry. However
in this article, I will focus on the auto and manual methods built into
Windows.
Windows 95
Auto
Backup
The Windows 95 registry is made up of two files, SYSTEM.DAT
and USER.DAT , located in your Windows folder. These registry files are backed
up automatically after every successful start of Windows. The backed up files
are named SYSTEM.DA0 and USER.DA0 and are also located in your Windows
directory. Should Windows fail to start due to a registry error, you will
be prompted to restart your computer to restore your registry. During the
reboot, the backed up da0 files are used to restore your registry to the
previous state it was before the error. This method, however, is by no means
fail proof.
It is quite common to end up with corrupted dat and da0 files.
This can easily happen when restarting after a bad regedit. Therefore, it
is wise to manually back up the registry before making any system
changes.
Windows 95 also contains an additional system.dat backup file
called System.1st located in your root drive(usually c:) This represents your
registry as it was when you first installed Windows. If your registry becomes so
corrupted that you can not recover it, you can always try replacing
c:\windows\system.dat with c:\system.1st and then renaming system1st,
system.dat. In my experience, however, this rarely works and it's usually easier
to just do a reinstall. The reason is that System1st is very bare bones; it
doesn't include all the many programs you may have installed after installing
Windows.
Manual
Backup
In WIndows 95, manually backing up the Regisry is
a simple matter of copying system.dat and user.dat and saving them to a safe
location(personally, I back up my registry files to a Windows folder named
Reg)
Note, that by default, dat files are hidden, so you must have Show All
Files enabled to find these files. To do that:
In any folder, click
View>Options>View and then check Show All
Files.
Restoring
Should the
registry become corrupt, you can use your backed up files to restore it.
To that, you would restart your computer in native DOS and at the C:\>
prompt, type the following commands, pressing Enter after each one(in this
example, it is assumed your backed up reg files are in
C:\Windows\Reg)
attrib -h -s -r c:\windows\system.dat
attrib -h -s -r
c:\windows\user.dat
attrib -h -s -r c:\windows\regbak\*.dat
copy
c:\windows\regbak\system.dat c:\windows\system.dat /v /y
copy
c:\windows\regbak\user.dat c:\windows\user.dat /v /y
Once the files are
copied, reboot.
Scanreg in Windows 95
Scanreg from Windows 98\98se can also be used to
back up\ restore the registry in Windows 95. Simply copy the 98 files,
scanregw.exe and scanreg.exe to your 95 hardrive. Both are self executing
files. Double click scanregw.exe and your registry will be scanned and
then you will be given the option to back it up.
The first backup you make will be placed in c:\windows\sysbckup in a cab
file named rb000.cab. See the details for scanreg in the Windows 98
section for more details.
Windows
98\98se
Registry Checker - Auto Backup &
Restore
The Registry Checker(aka ScanReg) is a built-in Registry
backup and restore tool and comes in two versions - scanregw.exe whiich
runs only in Windows and scanreg.exe which runs
only.
SCANREGW.EXE
The
WIndows Registry checker(scanregw.exe) scans your Windows 98 Registry for errors
once a day. If there are no errors, the Registry Checker automatically backs up
the Registry. If an error is found, the Registry Checker automatically restores
the most recent copy of the Registry. The Registry Checker keeps, by default,
five backup copies of the Registry and stores them as .CAB files in
C:\Windows\Sysbckup. The first backup is called RB000.CAB, the second RB001.CAB
and so on. You can increase the number of backups created by editing
scanreg.ini and changing the MaxBackupCopies entry.
SCANREG
To back up your registry in DOS using scanreg,
restart your computer in Dos mode and at the DOS prompt
type:
scanreg /backup
and press Enter. Scanreg will back up your
registry and then return a DOS prompt.
RestoringIn
most cases, you will be restoring the Registry in DOS mode using
scanreg.exe.
Start Windows in native Dos mode - the easy way to do this is to
simply choose Restart in MS-Dos Mode from the Shutdown menu or if you can't get
into Windows, reboot. press F8 at the startup screen and then choose Command
Prompt Only from the 98 Boot Menu.
At the prompt, type scanreg / restore and
follow the prompts.
You'll see a box listing each backup, the date each
was created, as well as information that tells you whether the backup has been
used to successfully start the operating system. All you need to do is select a
backup and press Enter.
To see all your scanreg options, type scanreg /? at
the DOS prompt.
Manual Backup &
Restore You can also use the Registry Checker to
backup the registry whenever you choose. Click Start>Run and type in
scanregw.exe to start the Registry Checker. After scanning the Registry for
errors, you will be asked if you would like to make another backup of the
Registry. Click Yes.
As well you can manually backup the
98 Registry by copying system.dat and user.dat which are in your Windows folder,
to a safe place(same way as in Windows 95) This is actually the easiest
way to backup the registry.
It's just a matter of copying and pasting the two
files to a new folder.
Note that these files are hidden by default.
If you can't find them, open any folder and click View>Folder
Options>View tab and choose Show All Files.
To restore the registry
from your own backed up system.dat and user.dat, follow the instructions
presented for Windows 95.
Automating the Manual
Backup & Restore of the Win9x Registry
The entire
manual backup and restore of the Windows 95\98\98se Registry can
be simplified with a couple of bat files that when clicked will
automatically backup or restore your Registry. Click
here for full instructions.
Windows 2000
Backup
Windows 2000 has the Windows 2000 Backup
utility for backing up the Registry. It's located in the the System Tools menu.
When you start it, you'll see an item called System State, under My Computer.
The System State is a collection of system specific data and as you will see
includes the Registry.
Simply select Registry and click the Start Backup
button.
Another method of backing up the Registry in Windows 2000 is by
rebooting your system and when you see the Please Select the Operating System to
Start message, press F8 and then use arrow keys to select the Last Known Good
Configuration option and press Enter. This instantly restores the most recent
copy of the Registry.
You can also use this method in Windows NT.
Restore
To restore the Win2K Registry, start the Backup
utility, select the Restore tab, choose the backup media, and then select the
System State check box. Note that this not only restores the Registry, but all
of the System State data.
Windows Me
Scanreg is also part of Windows Me but the main restore feature of Me
is
System Restore which automatically monitors and records changes made to
the essential Windows system files including the registry.
If your system
becomes corrupt, System Restore allows you to undo (or "roll back") a change
that caused instability in your system
To use, Click
Start>Programs>Accessories>System Tools, and then click System Restore.
Click Restore my computer to an earlier time and click Next.
In the
calendar that appears choose which Restore Point to roll your system back to and
click Next. You will then be prompted to close all programs and reboot. On
restart, a confirmation screen appears. Click OK to continue using your
computer.
The next time you start System Restore, you will see a third
option, Undo my last restoration. This is available in the event that the
Restore Point you rolled back to does not correct the original problem that you
were having and so you can easily get back to the point in time that you started
troubleshooting.
For more info on System Restore:
http://support.microsoft.com/support/kb/articles/q267/9/51.ASP