比较注册表项是通过REG COMPARE命令完成的。
REG COMPARE [ROOT\]RegKey [ROOT\]RegKey [/v ValueName] [Output] [/s] REG COMPARE [ROOT\]RegKey [ROOT\]RegKey [/ve] [Output] [/s]
Output - /od (only differences) /os (only matches) /oa (all) /on (no output).
@echo off REG COMPARE HKEY_CURRENT_USER\Console HKEY_CURRENT_USER\Console\Test
上面的程序将比较注册表项之间的所有值 HKEY_CURRENT_USER\Console & HKEY_CURRENT_USER\Console\Test.
Result Compared: Identical The operation completed successfully.
如果两个注册表项中的两个值之间存在差异,则它将显示在输出中,如以下输出所示。
< Value: HKEY_CURRENT_USER\Console EnableColorSelection REG_DWORD 0x0
Result Compared: Different
The operation completed successfully.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)