regedit 导入注册表

regedit /s file.reg

/s 没有任何提示信息

regedit命令,是针对系统注册表的操作命令,平时,我们可以在ms-dos下直接使用该命令。

  下面,给大家介绍一下regedit命令的参数及实例。

  一、regedit命令参数

  REGEDIT [/L:system] [/R:user] filename1
  REGEDIT [/L:system] [/R:user] /C filename2
  REGEDIT [/L:system] [/R:user] /E filename3 [regpath]

  参数说明:
  /L:system:指定 SYSTEM.DAT 文件的位置。(Specifies the location of the SYSTEM.DAT file.)
  /R:user:指定 USER.DAT 文件的位置。(Specifies the location of the USER.DAT file.)
  filename1:指定要导入到注册表的文件。(Specifies the file(s) to import into the regist)
  /C filename2:指定要导入到注册表的文件。(Specifies the file to create the registry from.)
  /E filename3:导出注册表到指定的文件。(Specifies the file to export the registry to.)
  regpath:指定要导出的注册表键值。(Specifies the starting registry key to export from.)
      若不指定,默认导出全部的注册表。(Defaults to exporting the entire registry.)
  /S:静寂模式,无结束提示。(Silent - no message on completion.)

  二、使用实例

  regedit /e "C:\test.reg" "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Ses sion Manager
  上述命令功能:“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Ses sion Manager\Environment”键进行导出。

  regedit /e F:\MyReg.reg
  上述命令功能:把整个注册表导出到F盘。

  regedit/s 在安静模式下导入注册表文件
  regedit/L 系统指定的system.dat
  regedit/R 用户指定的user.dat

原文地址:https://www.cnblogs.com/ahuo/p/2262114.html