Agree about the delay - ain't got any time to do this stuff, too much going on at work and private right now..
I've got something working. will post at lunchtime (1,5h away)

ok, lunchtime and 2:nd post since my previous post seems to have failed
Notice : I'm not really happy with this - but cannot give it more time nor fix it better...
added: just noticed that my comments wasn't in this .. you'll have to live with it a few hours (removed those tags after my first post...)
ADDED AGAIN ... Well, after peeking at the other codes, I finally got to the point of REALLY knowing what was to be done... buggr. well, I'll be happy if I recive a 'f' for this

Code:

;enjoy my totally wrong code:
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='28000000ffffffff02000000030000003c00000050000000feffffffb20300000205000002040000'


$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



If you haven't noticed yet - this doesn't do what it was meant to do ...
and since this is the second time I cannot use my webbrowser and screwed up a third post / alterning of this post... gah, this is what I'll post and deliver, since this post I have peeked at others codes, and therefore I disqalify both my spelling and paricipation in this 'round'...
well, rewrote it quickly - or, did my 'own' version of the 'real' thing... this is more or less fresh from the drawingboard - not something I would put in production...
Code:


If NOT @LOGONMODE
Break On
EndIf

Dim $SO
Dim $wro[],$apa,$count,$counter,$wr,$wri,$key,$val,$to,$o,$
$SO = SetOption("Explicit","On")
$SO = SetOption("NoVarsInStrings","On")
$SO = SetOption("NoMacrosInStrings","On")
$key='HKEY_CURRENT_USER\Software\Golfing'
$val='Round02'
$count=0
$counter=0

$wri=readvalue($key,$val)

for $count=0 to 80 step 2
$o=right(ltrim(substr($wri, 1, $count)),2)
if $count=6 $o='bc' endif
Redim preserve $wro[$counter] $wro[$counter]=$o
$counter=$counter+1
next
Redim $counter
$counter=0

for $counter = 0 to ubound($wro)
$to= $to + $wro[$counter]
next

;$to ?
;$wri ?
if $to = $wri 'entry already altered' ? exit @error else $wr=writevalue($key,$val,$to,'reg_binary') if @error 'error: ' + @ERROR @SERROR + ' ' ? else 'altered key' ? endif endif



Edited by Björn (2006-10-09 02:10 PM)