| 关键词: 注册表 备份 regedit 文件 数据 registry Specifies system user 命令 |
在Windows95/98视窗环境下维护注册表对大多数人来说并不陌生,但是,如果碰上注册表损坏,以致连视窗环境都无法进入时,该怎样对注册表进行维护?这里介绍几个在DOS方式下维护注册表的小窍门。 注册表编辑器一定要在视窗环境下才能运行吗?不! regedit.exe在DOS方式下照常可以运行。在DOS方式下键入命令行:regedit,就会出现语法提示如下: c:\>regedit Imports and exports registry files to and from the registry REGEDIT [/L:system] [/R:user] filename1 REGEDIT [/L:system] [/R:user] /C filename2 REGEDIT [/L:system] [/R:user] /E filename3 [regpath1] REGEDIT [/L:system] [/R:user] /D regpath2 /L:system Specifies the location of SYSTEM.DAT file. /R:user Specifies the location of USER.DAT file. filenamel Specifies the file(s) to import into the registry. /C filename2 Specifies the file to creat the registry from.. /E filename3 Specifies the file to export the registry to. regpath1 Specifies the starting registry key to export from (Defaults to exporting the entire registry). /D regpath2 Specifies the registry key to delete. c:\>_ 语法具体含义上面已经写得很清楚,结合例子说明如何使用。 导出注册表数据到一指定文件(例如test.reg),执行命令: c:\>regedit /E test.reg 从一指定文件(例如test.reg)导入注册表数据,执行命令: c:\>regedit test.reg 利用system.dat文件和user.dat文件导出注册表数据到一指定文件,执行: c:\>regedit /l:c:windows /r:c:\windows\testuser\ test /e test.reg 除了DOS方式下的regedit可以恢复被损坏的注册表文件,完成维护工作外,Windows98新增了一个注册表维护工具,同样可以胜任这一工作,它就是scanreg.exe,具有以下功能: 每次Windows98启动时,自动运行系统注册表检查程序检查注册表是否正确, 每天保留一份正确的注册表备份,缺省最多可以备份5份,即在windows的sysbackup目录下的 rb00*.cab,损坏的注册表存为rbbad.cab。 删除注册表中多余数据,减小注册表大小。 如果检查到注册表有问题,自动使用上次正确的注册表备份来恢复,如果连备份也没有,它会自动修复注册表。 scanreg.exe提供以下命令行参数: /backup 备份注册表数据 /restore 显示备份文件清单,按照备份时间排序 /comment= 设置备份文件注释 /fix 修复注册表 /autoscan 自动扫描注册表 /scanonly 自动扫描注册表,回报错误代号,但不备份。 回报的错误代号意义如下: 2 注册表数据损毁 0 没有错误 -2 内存不足 -3 找不到内存注册表数据的文件 -4 无法创建system.dat和user.dat -5 读注册表数据失败 -6 写注册表数据失败 -7 注册表数据正在被另外文件使用 也可以不带命令行参数直接运行scanreg.exe,完成检查注册表、建立新的注册表备份、选取某一备份文件来恢复注册表数据等。笔者就曾经利用这一方法修复注册表,使Windows98重见天日 |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|