A) This script requires administrative privileges to be successful
B) Why don't you use a admin script performing remote egistry edits to distribute the changes along the line sof
Code:

$comps=comnetview()
for each $comp in $comps
if not keyexist('\\'+$comp+'\HKLM\SOFTWARE...'
$rc=writevalue()
endif
next


Also, ADDKEY is normally unnecessary as WRITEVALUE will add the keys as well if missing.
_________________________
There are two types of vessels, submarines and targets.