restore registry backup made with regedit /E <PathToSaveFile>.reg

B

bill

Hello,

what is the best approach to restore a registry backup made with '
regedit /E <PathToSaveFile>.reg ' ?
( I am aware this can probably not be done successfully with a running
OS, therefore I am considering
to boot the machine with BartPE).


Thank's a lot for any feedback!

Bill
 
D

Dave Patrick

Exporting the entire registry to a *.reg file is not an acceptable means of
backup. You can't import the entire registry. If you run
Programs|Accessories|System Tools|Backup, then choose ERD, then if you check
the box for "Also backup....", then the reg will also be backed up to
%systemroot%\repair\RegBack
leaving the
%systemroot%\repair\
directory files intact as original installation.

Repair, Recovery, and Restore
http://www.microsoft.com/windows2000/techinfo/reskit/samplechapters/f...


You can replace registry hives from within the recovery console by copying
the files from
%systemroot%\repair\regback
to
%systemroot%\system32\config

To start the Recovery Console, start the computer from the Windows 2000
Setup CD or the Windows 2000 Setup floppy disks. If you do not have Setup
floppy disks and your computer cannot start from the Windows 2000 Setup CD,
use another Windows 2000-based computer to create the Setup floppy disks. At
the "Welcome to Setup" screen. Press F10 or R to repair a Windows 2000
installation, and then press C to use the Recovery Console. The Recovery
Console then prompts you for the administrator password. If you do not have
the correct password, Recovery Console does not allow access to the
computer. If an incorrect password is entered three times, the Recovery
Console quits and restarts the computer. Note If the registry is corrupted
or missing or no valid installations are found, the Recovery Console starts
in the root of the startup volume without requiring a password. You cannot
access any folders, but you can carry out commands such as chkdsk, fixboot,
and fixmbr for limited disk repairs. Once the password has been validated,
you have full access to the Recovery Console, but limited access to the hard
disk. You can only access the following folders on your computer: drive
root, %systemroot% or %windir%


--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
 
B

bill

Thank you very much Dave for the helpful informations! Does that also
mean,
a "reuseable" backup from the registry cannot be made from the
command-
line?

Bill

Exporting the entire registry to a *.reg file is not an acceptable means of
backup. You can't import the entire registry. If you run
Programs|Accessories|System Tools|Backup, then choose ERD, then if you check
the box for "Also backup....", then the reg will also be backed up to
%systemroot%\repair\RegBack
leaving the
%systemroot%\repair\
directory files intact as original installation.

Repair, Recovery, and Restorehttp://www.microsoft.com/windows2000/techinfo/reskit/samplechapters/f...

You can replace registry hives from within the recovery console by copying
the files from
%systemroot%\repair\regback
to
%systemroot%\system32\config

To start the Recovery Console, start the computer from the Windows 2000
Setup CD or the Windows 2000 Setup floppy disks. If you do not have Setup
floppy disks and your computer cannot start from the Windows 2000 Setup CD,
use another Windows 2000-based computer to create the Setup floppy disks. At
the "Welcome to Setup" screen. Press F10 or R to repair a Windows 2000
installation, and then press C to use the Recovery Console. The Recovery
Console then prompts you for the administrator password. If you do not have
the correct password, Recovery Console does not allow access to the
computer. If an incorrect password is entered three times, the Recovery
Console quits and restarts the computer. Note If the registry is corrupted
or missing or no valid installations are found, the Recovery Console starts
in the root of the startup volume without requiring a password. You cannot
access any folders, but you can carry out commands such as chkdsk, fixboot,
and fixmbr for limited disk repairs. Once the password has been validated,
you have full access to the Recovery Console, but limited access to the hard
disk. You can only access the following folders on your computer: drive
root, %systemroot% or %windir%

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]http://www.microsoft.com/protect

bill said:
what is the best approach to restore a registry backup made with '
regedit /E <PathToSaveFile>.reg ' ?
( I am aware this can probably not be done successfully with a running
OS, therefore I am considering
to boot the machine with BartPE).
Thank's a lot for any feedback!
 
O

Olof Lagerkvist

bill said:
Thank you very much Dave for the helpful informations! Does that also
mean,
a "reuseable" backup from the registry cannot be made from the
command-
line?


Yes, there is a tool called reg.exe in the Resource Kit that can be used
for this, for example

reg save HKLM\SOFTWARE C:\regbackup\software

will save HKLM\SOFTWARE key as C:\regbackup\software and that file can
then be used to replace the file "software" in
%SystemRoot%\system32\config using for example Recovery Console later if
you have to restore the backup.
 
B

bill

Yes, there is a tool called reg.exe in the Resource Kit that can be used
for this, for example

reg save HKLM\SOFTWARE C:\regbackup\software

will save HKLM\SOFTWARE key as C:\regbackup\software and that file can
then be used to replace the file "software" in
%SystemRoot%\system32\config using for example Recovery Console later if
you have to restore the backup.


Thank's a lot for your help. I tried the following commands:
(with reg.exe taken from \SUPPORT\TOOLS\SUPPORT.CAB on the Win2K
distribution CD
as Admin and normal user under XP and W2K3 as well)


- 'reg save HKLM\SOFTWARE c:\regbackup\software'
- 'REG SAVE \\machinename\HKLM\SOFTWARE c:\regbackup\software'


and always get the following error messages:

"The system was unable to find the specified registry key or value"


Question:
What am I doing wrong?


Any additional help is appreciated very much. Thank you!

Bill
 
O

Olof Lagerkvist

bill said:
Thank's a lot for your help. I tried the following commands:
(with reg.exe taken from \SUPPORT\TOOLS\SUPPORT.CAB on the Win2K
distribution CD
as Admin and normal user under XP and W2K3 as well)


- 'reg save HKLM\SOFTWARE c:\regbackup\software'
- 'REG SAVE \\machinename\HKLM\SOFTWARE c:\regbackup\software'


and always get the following error messages:

"The system was unable to find the specified registry key or value"


Sorry, 'c:\regbackup\software' was meant as an example path. You have to
replace it with a path to a filename in an already existing directory.
 
B

bill

Sorry, 'c:\regbackup\software' was meant as an example path. You have to
replace it with a path to a filename in an already existing directory.



It's working now. Thank you very much for your help! What would be a
good approach
to have a daily backupscript added the creation date to such a
registry-backup - output
(e.g. software-20070612)?


Of corse those saved registry file could be included in a daily backup-
schedule, but that's
not exactly I would like to do, and in addition 'reg save HKLM
\SOFTWARE c:\regbackup\software'
is confused if there is already a file with the same name in the
destination path.


Thank's a lot for any feedback!
 
O

Olof Lagerkvist

bill said:
It's working now. Thank you very much for your help! What would be a
good approach
to have a daily backupscript added the creation date to such a
registry-backup - output
(e.g. software-20070612)?


You can probably find some kind of solution if you use the %DATE%
variable in a batch file. If the %DATE% variable contains slash
caracters '/' in your language you can remove them with a for statement:

for /f "delims=/ tokens=1,2,3" %%a in ("%DATE%") do set MYDATE=%%a%%b%%c

or something similar. You can get the documentation for the 'for'
command by typing for /? at the command prompt.
 
B

bill

You can probably find some kind of solution if you use the %DATE%
variable in a batch file. If the %DATE% variable contains slash
caracters '/' in your language you can remove them with a for statement:

for /f "delims=/ tokens=1,2,3" %%a in ("%DATE%") do set MYDATE=%%a%%b%%c

or something similar. You can get the documentation for the 'for'
command by typing for /? at the command prompt.



Thank's for your help! I am using the command
"'reg save HKLM\SOFTWARE c:\regbackup\%date%__software"
which produces the outputfile "2007-06-21__software", which is
ok for me :)

Bill
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top