|
Thanks to everyone for their help with this...the script seems to be working like a charm now. I had writtent the original script using a loop and got a wierd "cannot read registry entry" when opening up RA. I took Jens suggestion and tried using the ArrayEnumValue () UDF and it worked like a charm. Here is a final posting of the code that works:
Break on dim $Regkey,$X,$changedx,$Value
? "Version Check"
If Keyexist("HKCU\Software\radmin\v2.0") or ("HKCU\Software\radmin\v2.1") goto RAGOOD Else Exit End IF
:RAGOOD If Keyexist("HKCU\Software\radmin\v2.0") $Regkey="HKCU\Software\radmin\v2.0\clients" else $Regkey="HKCU\Software\radmin\v2.1\clients" EndIf
$regvalues=ArrayEnumValue($regkey) for each $value in $regvalues $content = readvalue($regkey,$value) $content = left($content,28)+'0A'+substr($content, 31) $rc = writevalue($regkey,$value,$content,'REG_Binary') next exit
function arrayenumvalue($regsubkey) dim $retcode, $valuecounter, $currentvalue, $valuearray if not keyexist($regsubkey) $arrayenumvalue='' return endif
$valuecounter=0 do $currentvalue=enumvalue($regsubkey,$valuecounter) if $currentvalue<>259 and @ERROR=0 redim preserve $valuearray[$valuecounter] $valuearray[$valuecounter]=$currentvalue $valuecounter=$valuecounter+1 endif until $currentvalue=259 or @ERROR
$arrayenumvalue=$valuearray endfunction
Thanks again everyone!!
|