Restore Windows registry

If your computer is crashing and you don't know why, restoring a recent working registry can be very helpful and will often fix your problems. Be aware though that this will most likely cause software that was installed after you backed up your registry to not work properly.

Of course, it won't remove any files or anything, but the registry is like Windows' brain. You took out its memory of when that program was installed, so as far as the registry knows, that software was never installed (even though its files exist on the hard drive).

You will just have to reinstall the software after restoring your registry. This tutorial assumes you have backed up your registry according to the guidelines in Backup Windows Registry.

How to restore the Windows registry

Boot your computer with a boot disk or by pressing F8 just before your computer says "Starting Windows...". Choose "Command Prompt Only" as your boot option.

Type in these commands in sequence to restore your registry:

cd c:\windows   (changes directory to Windows)
attrib user.dat -h -r   (makes file not hidden/restricted)
attrib system.dat -h -r   (same)
cd c:\backup   (changes directory to your backup dir)
copy user.dat c:\windows   (copy file to backup folder)
copy system.dat c:\windows   (same)
copy win.ini c:\windows   (same)
copy system.ini c:\windows   (same)
cd c:\windows   ( attrib user.dat +h +r   (gives attributes back to file)
attrib system.dat +h +r   (same)

Now you have properly restored your windows registry. Power on your computer and see if your problem(s) are fixed.

Tip: You can copy and paste the commands above into a file in Notepad with slight modifications (no "cd" commands. Instead just use full paths for each command i.e. copy c:\backup\user.dat c:\windows). Then save the file somewhere as MS-DOS Batch File "restore.bat". Then you can just run the batch file anytime to restore your registry (preferably after booting to DOS).