If NOT @LOGONMODE
Break On
EndIf
Dim $SO
$SO = SetOption("Explicit","On")
$SO = SetOption("NoVarsInStrings","On")
$SO = SetOption("NoMacrosInStrings","On")
;
dim $counter,$key,$val
dim $wr,$add,$wri
dim $split[],$c,$x
dim $sp[],$spl,$
;define values
$counter=0
$key='HKEY_CURRENT_USER\Software\Golfing'
$val='Round02'
$add='28,00,00,00,ff,ff,ff,ff,02,00,00,00,03,00,00,00,3c,00,00,00,50,\'+ '00,00,00,fe,ff,ff,ff,b2,03,00,00,02,05,00,00,02,04,00,00'
$wri='28000000ffffffff02000000030000003c00000050000000feffffffb203'+
'00000205000002040000'
$wr=readvalue($key,$val)
$split=split($add,',')
for each $c in $split
select
case $counter = 2 $c = 'bc' Redim preserve $sp[$counter] $sp[$counter]=$c
case 1 if instr($c,'\') $x=substr($c, len($c) - 1, 3)
$=trim($x) Redim preserve $sp[$counter]
$sp[$counter]=$x else Redim preserve $sp[$counter] $sp[$counter]=$c endif
endselect
$counter=$counter+1
next
ReDim $counter
$counter=0
for $counter = 0 to ubound($sp)
$spl = $spl + $sp[$counter]
next
/*
$wr ' Read value from reg' ?
$wri ' should be equal to line above' ?
$spl ' this is what we wanna write' ?
*/
if $wr = $spl 'entry already altered' ? exit @error
else
$wr=writevalue($key,$val,$spl,'reg_binary')
if @error 'error: ' + @ERROR @SERROR + ' ' ?
else
'altered key' ? endif endif