Unfortunately, REGEDIT does not backup all the registry,
and using it to restore the registy is tricky. ERUNT.EXE,
described in a previous reply will work, and is free. A
friendlier program is RescueXP, but that is not free.
Still, it does a lot more than just backup/restore the
registy.
More extreme measures include using Ntbackup.exe (on the
XP CDROM), but that backs up whole directory trees, such
as Documents and Settings.
Finally, for there are disk or partition backup software
like Norton GHOST, Acronis TrueImage, and PowerQuest
DriveImage, which backup 100% of the files on a partition
(or all partition on a disk), hence capture the registry.
These are also ueul for major hard drive or bad-install
problems or virus attacks.