Batch file Compare Registry With Text File
Is it possible to compare registry with Text file? I've search about it, doesn't seem possi开发者_开发问答ble, I'm new to batch writing. Like I want to compare is the registry HKCU\Software\Random\KeyNameHere different to text.txt File
You could use
reg query HKCU\Software\Random\KeyNameHere
to get the output of the key to console.
@echo off
reg query HKCU\Software\Random\KeyNameHere > one.txt
fc one.txt path\to\text.txt
First note that you are comparing oranges and apples, a file is a name and data, while a registry may be several keys and data at the same time.
Then, powershell may help you a lot here, it allows navigating the registry like a drive.
MSDN link on how to do it
精彩评论