regedit.exe参数说明

来源:互联网 发布:怎么控制js隐藏div 编辑:程序博客网 时间:2024/05/03 09:56

  说到备份注册表,大家首先想到的肯定是用超级兔子之类的系统优化软件,实际上在XP系统中用系统自带的注册表编辑器(regedit.exe)这个程序就能备份注册表了。

  它有以下几种常用用法:

1。备份

regedit /e filename [regpath] 将指定的注册表分支备份(如未指定regpath则对所有的分支进行备份)

如:

regedit /e backup.reg 将注册表的所有分支备份到当前路径下的backup.reg文件

regedit /e backup.reg HKEY_LOCAL_MACHINE/SYSTEM 将HKEY_LOCAL_MACHINE/SYSTEM分支导出到backup.reg文件(注意分支间分隔用“/ ”,而不是“/ ”)

 

2。还原

regedit [/s]  filename 将指定文件导入注册表(加/s表示以安静模式导入,即不提示)

如:

regedit backup.reg 将backup.reg导入注册表

regedit /s backup.reg 以安静模式将backup.reg导入注册表

 

附:regedit 在DOS下的完整用法

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.

原创粉丝点击