' change drive or partition
c:
' to ensure c: is the system partition, run dir: it should list windows, users, program files, etc, present in your system partition
dir
' if c: is not the system partition, you should do more tries; examples: d: or e: or f:, always followed by dir
' when you find the correct drive letter, you should use THAT letter when you see c:\ in the following commands
' change directory to system32
cd C:\Windows\System32
' you should now see your command prompt became c:\windows\system32>
' create the backup directory CurrentCorruptBackup (or configbackup, like writhziden said.. Just use your preferred name and keep it in mind you should use that name for the following three commands)
md CurrentCorruptBackup
' if you run dir now, you should see the new folder CurrentCorruptBackup
' copy the current config content, i.e. all corrupted registry files, to CurrentCorruptBackup
copy config CurrentCorruptBackup
' make sure the files were copied to the CurrentCorruptBackup folder
dir /a CurrentCorruptBackup
' change directory to regback, where a hopefully working copy of windows registry has been backed up by windows itself
cd config\RegBack
' you should now see your command prompt became c:\windows\system32\config\regback>
' to ensure there aren't any files with 0 as size, run dir. "If there are any size 0 files, do not continue"
' you should usually see five files here: DEFAULT, SAM, SECURITY, SOFTWARE, SYSTEM
dir
' copy these files to the parent directory C:\Windows\System32\config
copy * ..\*
' if you did it correctly, the prompt will ask you if you want to overwrite the files, and you'll answer yes to each one of the five files
' alternative command to use instead of the previous one
' remember to use the correct drive letter, found at first steps
copy * C:\Windows\System32\config\