I tried it on my 64 bit Win7 laptop. The following reads and writes the registry value once I added Allen's suggestion. Can you check the error code after you try the write?

 Code:
$nul = setoption("WOW64AlternateRegView","On")

$CLIENTNAME = READVALUE("HKLM\Software\Citrix\ICA\Session", "ClientName") 

$nul = WriteValue("HKCU\Software\Test", "KixTest", $CLIENTNAME, "REG_SZ")

$nul = MessageBox("Error Number: "+@Error+@CRLF+"Error Text: "+@SError,"status",0)