I've found a curious bug in the "writevalue" function, If I try this:

$sub="HKEY_CURRENT_USER\Software\Microsoft\Internet Connection Wizard"
$name="Completed"
$value="01000000"
$dtype="REG_BINARY"

WriteValue($sub,$name,$val,$dtype)

Everything works as normal, but if I try this:

Function WRITEINREG($sub,$name,$value,$dtype)
Dim $n
$n=WriteValue($sub,$name,$val,$dtype)
EndFunction

$sub="HKEY_CURRENT_USER\Software\Microsoft\Internet Connection Wizard"
$name="Completed"
$value="01000000"
$dtype="REG_BINARY"

WRITEINREG($sub,$name,$value,$dtype)

the data is not properly written to the registry as you can see if check the registry before and after.

NOTE: I've posted this as an example to make the function fail, I'm trying to do something different, but I need to pass the parameters through a Function and then write to the registry.
_________________________
Regards