Compare the Registry

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I would like to check with the some of the registry value or key. Does
any tools that can easily to find out does the value or key is the same
as I except? (Like Security Configuration and Analysis)
Does the compare tools can run on command line?

Thanks a lot!
 
Hello:

I would like to check with the some of the registry value or key. Does
any tools that can easily to find out does the value or key is the same
as I except? (Like Security Configuration and Analysis)
Does the compare tools can run on command line?

Thanks a lot!


You could export a model, like regedit /A model.txt "TheKey"

Later, regedit /A now.txt "TheKey"

FC model.txt now.txt

See tip 305 in the 'Tips & Tricks' at http://www.jsiinc.com

Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Hello:

I would like compare a few registry values.
E.G.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\CrashOnAuditFail
I would to check doe the registry value is 1 or not.

Thanks!
 
Hello:

I would like compare a few registry values.
E.G.
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Lsa\CrashOnAuditFail
I would to check doe the registry value is 1 or not.

Thanks!
Use REG.EXE, built into Windows XP, Windows Server 2003, and later, or installed from the Windows 2000 Support Tools on your O/S CD-ROM.

set CrashOnAuditFail=N
for /f "Tokens=1,3" %%a in ('reg query "HKLM\System\CurrentControlSet\Control\Lsa" /V CrashOnAuditFail^|Findstr /I /L /C:"CrashOnAuditFail"') do (
for /f "Tokens=2 Delims=x" %%c in ('@echo %%b') do (
set CrashOnAuditFail=%%c
)
)
if "%CrashOnAuditFail%" EQU "N" goto notfound
if "%CrashOnAuditFail%" EQU "1" goto coaf1


OR

set CrashOnAuditFail=N
for /f "Tokens=1,3" %%a in ('reg query "HKLM\System\CurrentControlSet\Control\Lsa" /V CrashOnAuditFail^|Findstr /I /L /C:"CrashOnAuditFail"') do (
set CrashOnAuditFail=%%b
)
if "%CrashOnAuditFail:~2,1%" EQU "1" goto coaf1


Jerold Schulman
Windows Server MVP
JSI, Inc.
http://www.jsiinc.com
 
Back
Top