I tend to back up everything, which not only helps in the event of the occasional catastrophic failure, but is also a godsend in the event of doing something stupid. The first step, of course, is taking backups of everything via BackupPC, so if you’ve landed here and haven’t done that … well, go do that. (If you’re in the unfortunate circumstance of having lost your registry without a backup, well, it’s something to remember for next time.)
What you’ll need: a USB stick with Windows 10 boot media. You can download this right from Microsoft. You’ll also need some way to retrieve your backed up files from your BackupPC installation, but that’s pretty easy.
Locate the hive files from the BackupPC host in question — you’ll find them under \windows\system32\config. You can be surgical about this if you know exactly which hives need restoring, or you can go for the nuclear option:
system
sam
security
software
default
You’ll need them on the USB stick; it’s simplest just to download a .zip file of what you need, then unpack it onto the USB drive. It doesn’t matter where, as long as you can find it later.
Boot from the USB drive (this may require tweaking the boot device in the BIOS) then go to Recover Windows, then go to a command prompt. If you’ve just booted, you probably have an abbreviated C: drive and an X: drive, neither of which is the hard drive you want to copy things to.
diskpart
list volume
(one of these is going to be your Windows drive, it shouldn’t be too hard to pick out)
select volume [number]
assign letter [unused drive letter]
exit
Now copy the registry files from the backups on the USB stick (probably mounted as C:) right over their counterparts on the drive you just mounted. You might want to make backups first, but that’s up to you.
Reboot, and your registry is back