代码之家  ›  专栏  ›  技术社区  ›  Andrew

如何将导出的注册表项附加到文件。规则

  •  0
  • Andrew  · 技术社区  · 8 年前

    找不到将Reg export输出附加到现有文件的方法,因此我正在运行此命令

    REG EXPORT HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\NvCplDesktopContext\ backup.reg
    

    将某些设置导出到备份。reg文件当它尝试导出其他内容时,我收到一条消息,这将覆盖该文件。无论如何,我可以将其附加到文件中,而不是重写reg文件?

    1 回复  |  直到 8 年前
        1
  •  2
  •   Gene    8 年前

    怎么样

    @echo off 
    
    REG EXPORT HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\First\ current.tmp /y
    more current.tmp >> merged.reg
    
    REG EXPORT HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Second\ current.tmp /y
    more +1 current.tmp >> merged.reg
    
    REG EXPORT HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\Third\ current.tmp /y
    more +1 current.tmp >> merged.reg
    
    rm current.tmp