in such a situation, you would have to boot up with a windows cd and launch the recovery console. in doing so, you will then get access to the disk prompt, whereas you would then use regular dos commands to restore your backup'd registry.
there is also another method via the disk prompt for restoring the registry that were backup'd via system restore.
the method i am providing does work with winxp systems but i haven't tested on subsequent releases. however, it is a viable method to try as a last ditch effort to avoid a disk format:
http://pcsmarties.wordpress.com/system-restore-via-disk-prompt/
incidentally, you might also try to understand that while infections can destroy the registry and other system files, restoring the registry is sometimes futile because corrupted system files also have to be replaced with genuine ones.
to this end, sometimes your only option would be to re-install the o.s. from scratch, that is if you can't execute a system repair installation. so the highest recommendation that i can possible provide is for you to either maintain a backup of your personal files, mailboxes, pictures, etc "or" move their folders onto an extended partition or alternate disk drive.
in doing so, you will protect them from formatting, in the event it becomes your only option for restoring your computer.