如何将导出的注册码附加到 file.reg

How append exported reg key to file.reg

找不到将 Reg 导出输出附加到现有文件的方法,所以我运行这个命令

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

要将某些设置导出到 backup.reg 文件,当它尝试导出其他内容时,我收到消息说这将覆盖该文件。不管怎样,我可以将它附加到文件而不是重写 reg 文件吗?

怎么样...

@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