|
yiyesong
元老会员
        
积分 1987
发帖 632
注册 2002-10-27
状态 离线
|
『楼 主』:
转贴:在DOS下使用注册表
使用 LLM 解释/回答一下
以下是取自于《电脑教育报》,特转贴于此,希望能够对朋友们有所帮助。
注册表编辑器不仅可以在Windows下运行使用,还可以在MS-DOS实模式下运行。有时注册表受到损坏而无法启动Windows时,我们就只有在DOS模式下修复或修改注册表了。注册表的实际物理文件为System.dat和User.dat,也就说注册表中的数据保存在这两个文件中。
导出注册表
此命令可以实现对注册表文件进行备份。
命令格式:Regedit /L:system /R:user /E filename.reg Regpath
参数含义:
/L:system指定System.dat文件所在的路径。
/R:user指定User.dat文件所在的路径。
/E:此参数指定注册表编辑器要进行导出注册表操作,在此参数后面空一格,输入导出注册表的文件名。
Regpath:用来指定要导出哪个注册表的分支,如果不指定,则将导出全部注册表分支。
如果打算将保存在C:\Windows\System.dat和保存在 C:\Windows\Profiles\User.dat 中所有HKEY_CLASSER_ROOT根键下的分支导出到file.reg中,可以执行如下命令:Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /e file1.reg HKEY_CLASSER_ROOT
导入注册表
命令格式:Regedit /L:system /R:user file.reg
参数含义:
/L:system指定System.dat文件所在的路径。
/R:user指定User.dat文件所在的路径。
重建注册表
重建注册表,即重新建立System.dat和User.dat文件。
命令格式:Regedit /L:system /R:user /C file.reg
参数含义:
/L:system指定System.dat文件所在的路径。
/R:user指定User.dat文件所在的路径。
/C:此参数将告诉注册表编辑器,用所指定的.reg文件中的内容重新建立注册表。
如果要用file.reg文件中的内容重新建立整个注册表,并将其保存到C:\Windows\System.dat和C:\Windows\Profiles\User.dat中,可执行命令:Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /C file1.reg
删除注册表分支
此命令可以将注册表中的一个子键分支删除。
命令格式为:Regedit /L:system /R:user /D Regpath
参数含义:
/L:system指定System.dat文件所在的路径。
/R:user指定User.dat文件所在的路径。
/C:此参数告诉注册表编辑器,将Regpath所指定的注册表子键分支删除。
恢复注册表
Scanreg.exe可以检查、备份、恢复、修复注册表,此命令存放在“Windows\Command”目录下。
命令格式:Scanreg
参数含义:
/backup参数是备份注册表和相关的配置文件,这些文件分别\windows目录下的System.dat、User.dat、Win.ini、System.ini四个文件,把这些文件压缩成rb???.cab一个文件,存放在\windows\sysbckup目录下,多次使用此命令会产生多个CAB文件,一般从000开始,系统默认最大备份数为5个。可在\Windows\scanreg.ini文件中对最大备份数进行修改,通过修改“maxbackupcopies=?”的数值即可。
/restore参数是选择一个备份进行恢复注册表,此命令不能在Windows 98环境下执行,必须关机后,重新启动进入纯DOS方式下运行。
/fix 参数是修复损坏的注册表,此命令也只能在DOS方式下运行。
/comment="" 参数是在备份注册表时增加一些详细的注释到CAB文件中。
恢复遭到破坏的注册表文件,可以使用Scanreg命令进行修复,方法是,首先进入DOS系统操作环境,然后执行以下命令:Scanreg/Restore
此时系统会提示注册表备份情况,包括CAB文件名及备份时间等,用户可以选择要恢复的CAB文件进行恢复。
如果要查看所有的备份文件及同备份有关的部分,可以执行命令:Scanreg /restore /comment
如果注册表有问题,可以使用Scanreg来修复,命令为:Scanreg /fix。
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.
|

http://dos.e-stone.cn/dosbbs
uploadImages/200311161145850422.swf
|
|
2002-11-2 00:00 |
|
|
gao
新手上路

积分 13
发帖 7
注册 2009-2-23
状态 离线
|
|
2009-3-5 02:22 |
|
|
wangfangjian
中级用户
  
积分 274
发帖 192
注册 2009-1-7
状态 离线
|
『第 3 楼』:
使用 LLM 解释/回答一下
好东西 建议应该加精吧
Good stuff. It is suggested that it should be highlighted.
|
|
2009-3-6 10:34 |
|
|
wangfanlin
新手上路

积分 16
发帖 8
注册 2008-12-28
状态 离线
|
|
2009-3-7 00:00 |
|
|
dosos
新手上路

积分 9
发帖 6
注册 2008-9-24
状态 离线
|
『第 5 楼』:
使用 LLM 解释/回答一下
不看不知道,谢谢。很详细的教程。
Oh, I see. Thank you. It's a very detailed tutorial.
|
|
2009-3-8 00:38 |
|
|
mohaiyin
新手上路

积分 6
发帖 3
注册 2008-7-18
状态 离线
|
『第 6 楼』:
使用 LLM 解释/回答一下
scanreg 这个命令以前在win98的dos里有用过,xp系统又怎么用呢?
The scanreg command was used in DOS of Win98 before. How to use it in XP system?
|
|
2009-7-9 05:41 |
|
|
a7147125
新手上路

积分 19
发帖 10
注册 2009-7-7
状态 离线
|
|
2009-8-6 12:33 |
|
|
lovehangain
初级用户
 
积分 64
发帖 32
注册 2009-6-24
状态 离线
|
|
2009-8-9 10:38 |
|
|
wjrzhi
新手上路

积分 8
发帖 4
注册 2009-8-8
状态 离线
|
|
2009-8-12 13:01 |
|
|
sfcctv
中级用户
  
积分 208
发帖 135
注册 2009-9-12 来自 离恨天
状态 离线
|
|
2009-9-30 17:38 |
|
|
lifeifei007
新手上路

积分 6
发帖 3
注册 2009-10-8
状态 离线
|
|
2009-10-12 18:04 |
|
|
kevinm
新手上路

积分 14
发帖 10
注册 2009-12-1
状态 离线
|
『第 12 楼』:
使用 LLM 解释/回答一下
注册表我还是不敢乱来
I still don't dare to mess with the registry casually
|
|
2009-12-2 14:17 |
|
|
onlinepony
新手上路

积分 14
发帖 7
注册 2009-11-30
状态 离线
|
|
2009-12-3 19:37 |
|
|
Sunjoy
初级用户
 
积分 29
发帖 17
注册 2009-12-1
状态 离线
|
『第 14 楼』:
老实说,注册表这东西是得好好学学……
使用 LLM 解释/回答一下
: :):):)
However, there are so many sub-keys in the registry. Is there anyone who can give pointers on a quick way to distinguish the functions of each sub-key?
|
|
2009-12-5 04:15 |
|
|
caimingbing
初级用户
 
积分 50
发帖 26
注册 2009-12-4
状态 离线
|
『第 15 楼』:
使用 LLM 解释/回答一下
我就知道最后一个scanreg/fix
I just knew the last one is scanreg/fix
|
|
2009-12-5 17:04 |
|