The following works:
 Code:
DIM $strKeyB, $strLoc, $strRet
$strKeyB = "HKCU\Software\Newkey"
$strLoc  = ""
$strRet  = WriteValue($strKeyB, $strLoc, 0, REG_DWORD)
If @ERROR = 0
   "Created the new key" ?
Else
   "There was an error writing to the registry, " + $strKeyB + "\" + $strLoc ?
EndIf


Where are you having a problem?