Code:

$a=readvalue('hkcu\software\kixtart','value')
$b='aaa','bbb','ccc'
select
case @ERROR
; value does not exist
$rc=writevalue('hkcu\software\kixtart','value','1234','REG_SZ')
case ascan($b,$a)
; value in array
case 1
; value not in array
endif

_________________________
There are two types of vessels, submarines and targets.