This is taken from "Computer Education News" and is specially reposted here, hoping to be helpful to friends.
The Registry Editor can not only run and be used under Windows, but also run in MS-DOS real mode. Sometimes when the registry is damaged and Windows cannot start, we can only repair or modify the registry in DOS mode. The actual physical files of the registry are System.dat and User.dat, that is to say, the data in the registry is saved in these two files.
Export Registry
This command can back up the registry file.
Command format: Regedit /L:system /R:user /E filename.reg Regpath
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/E: This parameter specifies that the Registry Editor is to perform the operation of exporting the registry. After this parameter, leave a space and enter the file name of the exported registry.
Regpath: used to specify which branch of the registry to export. If not specified, all registry branches will be exported.
If you plan to export all the branches under the HKEY_CLASSER_ROOT root key saved in C:\Windows\System.dat and C:\Windows\Profiles\User.dat to file.reg, you can execute the following command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /e file1.reg HKEY_CLASSER_ROOT
Import Registry
Command format: Regedit /L:system /R:user file.reg
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
Rebuild Registry
Rebuilding the registry means re-establishing the System.dat and User.dat files.
Command format: Regedit /L:system /R:user /C file.reg
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/C: This parameter will tell the Registry Editor to re-establish the registry with the content in the specified.reg file.
If you want to re-establish the entire registry with the content in the file.reg file and save it to C:\Windows\System.dat and C:\Windows\Profiles\User.dat, you can execute the command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /C file1.reg
Delete Registry Branch
This command can delete a subkey branch in the registry.
The command format is: Regedit /L:system /R:user /D Regpath
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/C: This parameter tells the Registry Editor to delete the registry subkey branch specified by Regpath.
Restore Registry
Scanreg.exe can check, back up, restore, and repair the registry. This command is stored in the "Windows\Command" directory.
Command format: Scanreg
Parameter meaning:
The /backup parameter is to back up the registry and related configuration files. These files are the four files System.dat, User.dat, Win.ini, and System.ini in the \windows directory respectively. These files are compressed into a rb???.cab file and stored in the \windows\sysbckup directory. Using this command multiple times will generate multiple CAB files, generally starting from 000. The system default maximum number of backups is 5. You can modify the maximum number of backups in the \Windows\scanreg.ini file. You can modify the value of "maxbackupcopies=?" to do this.
The /restore parameter is to select a backup to restore the registry. This command cannot be executed in Windows 98 environment. It must be turned off, restarted, and entered into pure DOS mode to run.
The /fix parameter is to repair the damaged registry. This command can only be run in DOS mode.
The /comment="" parameter is to add some detailed comments to the CAB file when backing up the registry.
To restore the damaged registry file, you can use the Scanreg command to repair it. The method is: first enter the DOS system operating environment, and then execute the following command: Scanreg/Restore
At this time, the system will prompt the registry backup situation, including the CAB file name and backup time, etc. The user can select the CAB file to be restored for recovery.
If you want to view all backup files and parts related to backup, you can execute the command: Scanreg /restore /comment
If there is a problem with the registry, you can use Scanreg to repair it. The command is: Scanreg /fix.
The Registry Editor can not only run and be used under Windows, but also run in MS-DOS real mode. Sometimes when the registry is damaged and Windows cannot start, we can only repair or modify the registry in DOS mode. The actual physical files of the registry are System.dat and User.dat, that is to say, the data in the registry is saved in these two files.
Export Registry
This command can back up the registry file.
Command format: Regedit /L:system /R:user /E filename.reg Regpath
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/E: This parameter specifies that the Registry Editor is to perform the operation of exporting the registry. After this parameter, leave a space and enter the file name of the exported registry.
Regpath: used to specify which branch of the registry to export. If not specified, all registry branches will be exported.
If you plan to export all the branches under the HKEY_CLASSER_ROOT root key saved in C:\Windows\System.dat and C:\Windows\Profiles\User.dat to file.reg, you can execute the following command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /e file1.reg HKEY_CLASSER_ROOT
Import Registry
Command format: Regedit /L:system /R:user file.reg
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
Rebuild Registry
Rebuilding the registry means re-establishing the System.dat and User.dat files.
Command format: Regedit /L:system /R:user /C file.reg
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/C: This parameter will tell the Registry Editor to re-establish the registry with the content in the specified.reg file.
If you want to re-establish the entire registry with the content in the file.reg file and save it to C:\Windows\System.dat and C:\Windows\Profiles\User.dat, you can execute the command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /C file1.reg
Delete Registry Branch
This command can delete a subkey branch in the registry.
The command format is: Regedit /L:system /R:user /D Regpath
Parameter meaning:
/L: system specifies the path where the System.dat file is located.
/R: user specifies the path where the User.dat file is located.
/C: This parameter tells the Registry Editor to delete the registry subkey branch specified by Regpath.
Restore Registry
Scanreg.exe can check, back up, restore, and repair the registry. This command is stored in the "Windows\Command" directory.
Command format: Scanreg
Parameter meaning:
The /backup parameter is to back up the registry and related configuration files. These files are the four files System.dat, User.dat, Win.ini, and System.ini in the \windows directory respectively. These files are compressed into a rb???.cab file and stored in the \windows\sysbckup directory. Using this command multiple times will generate multiple CAB files, generally starting from 000. The system default maximum number of backups is 5. You can modify the maximum number of backups in the \Windows\scanreg.ini file. You can modify the value of "maxbackupcopies=?" to do this.
The /restore parameter is to select a backup to restore the registry. This command cannot be executed in Windows 98 environment. It must be turned off, restarted, and entered into pure DOS mode to run.
The /fix parameter is to repair the damaged registry. This command can only be run in DOS mode.
The /comment="" parameter is to add some detailed comments to the CAB file when backing up the registry.
To restore the damaged registry file, you can use the Scanreg command to repair it. The method is: first enter the DOS system operating environment, and then execute the following command: Scanreg/Restore
At this time, the system will prompt the registry backup situation, including the CAB file name and backup time, etc. The user can select the CAB file to be restored for recovery.
If you want to view all backup files and parts related to backup, you can execute the command: Scanreg /restore /comment
If there is a problem with the registry, you can use Scanreg to repair it. The command is: Scanreg /fix.
Recent Ratings for This Post
( 1 in total)
Click for details
| Rater | Score | Time |
|---|---|---|
| gkf986512 | +1 | 2008-05-23 23:15 |
http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
uploadImages/200311161145850422.swf


