Creating a batch file for automatic date-based backups
ERUNT has a very convenient feature: it can run at the command prompt. By using some of its parameters, it can automatically save the registry files into a folder named with the current date.
Open a text file and enter the following:
C:\erunt\ERUNT.EXE %SystemRoot%\ERDNT\#Date# /noconfirmdelete
The first part is the path where the file is located, and the second part is the "backup to" location, that is, the C:\WINNT\ERDNT directory, using the current date as the subfolder name. "noconfirmdelete" means that if a folder with the same name exists, it will be deleted automatically.
Save this file as "backupreg.bat" and place it on the desktop for easy use at any time.
Tip
A free little registry optimization tool
In the folder where ERUNT is located, there is also a little tool called "NTREGOPT.EXE". After double-clicking to run it, the program will automatically scan the registry and provide a report of the registry size before and after "slimming down". Just press "OK" to complete the registry optimization.
Step 3: When to back up the registry
Although you can put this batch file in "Start→Programs→Startup" or use it as a logon script, thus achieving automatic backup at Windows startup like Windows 98, or use "Scheduled Tasks" for timed backups, we think that is unnecessary. In fact, the best time to back up the registry is: before updating system files or drivers, before installing new programs (while Windows is still running properly), or before performing risky operations. At those times, just double-click this batch file to back up the registry, and the backup files will be saved in a folder like "C:\WINNT\ERDNT\2004-8-15”".
Step 4: Restore the registry
If the system can still boot normally, then you can directly go into the "C:\WINNT\ERDNT\”" folder, choose a previous backup subfolder (for example: "2004-8-15"), and then run "ERDNT.EXE" inside it to restore the registry.
If the system cannot boot, you can try pressing F8 at the startup menu and choosing "Last Known Good Configuration". If that does not work, try entering Safe Mode. If neither works, then you need to use the following method to restore the registry.
Method 1: If a dual-boot system is installed, you can enter the other normal Windows and run "ERDNT.EXE" in the backup folder to restore. If the drive letters have changed in the other Windows, for example, if drive C becomes drive D, then before restoring, use Notepad to open the "ERDNT.INF" file in the backup folder and replace all "C:" entries in it with "D:".
Method 2: Boot the system with the Windows 2000/XP installation CD. At the setup welcome menu, press R, then press C to enter the Recovery Console, then enter the password to log into the system. Next, enter the command "CD C:\WINNT\ERDNT”" to go to the folder where the registry backup files are stored, and then use the CD command again to enter the corresponding backup folder, for example: "CD 2004-8-15".
Then enter the command "batch erdnt.con" and press Enter. This will restore the backed-up registry files. When finished, enter "exit" to leave the Recovery Console. The system will then restart using the selected registry backup.
Tip
★Cases where the registry cannot be restored or restoring has no effect
The device or device driver is damaged, so restoring has no effect.
System files are damaged or missing, so restoring has no effect.
The hard disk has logical or physical damage, or there is a partition table error, so restoring has no effect.
A virus infection has not been completely removed, so restoring has no effect.
★Install the Recovery Console onto the hard disk
Is it a bit troublesome to use the Windows 2000/XP installation CD every time to enter the Recovery Console? Actually, you only need to put the installation CD into the CD-ROM drive, then press Win+R, enter "X:\i386\winnt32.exe /cmdcons" (where "X" is the drive letter of the CD-ROM drive; please modify it according to your actual situation), and after pressing Enter, the Recovery Console can be installed onto the hard disk. Later, when restoring the registry, you only need to choose the Recovery Console option from the startup menu to enter it quickly and perform the restore.
[ Last edited by qwertl on 2008-9-16 at 01:19 PM ]