For a vbscript method...change the path, "Value" and "Data" to be what you need...
Dim objShell:Set objShell = CreateObject("WScript.Shel
strRegPath = "HKLM\SOFTWARE\Application
strValue = objShell.RegRead(strRegPat
If strValue <> "RequiredValue" Then strResult = objShell.RegWrite(strRegPa
Main Topics
Browse All Topics





by: oBdAPosted on 2007-04-22 at 14:07:59ID: 18955194
Just in case a batch might do it as well (note that what you're looking for is the data, the value is the name of the "variable"):
/f
reg query "HKLM\Software\Acme" /v "TheValue" | find /i "TheDataThatShouldBeThere"
if errorlevel 1 (
>>"TheLogFile.txt" echo %Date% %Time% Incorrect data found!
reg add "HKLM\Software\Acme" /v "TheValue" /d "TheDataThatShouldBeThere"
)