What would keep you from viewing a value (error code -1) and can/how do you get past that problem?
Here's where I'm encountering the problem:
[ autoit ]
$a = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography", "MachineGuid")
MsgBox(0,'',$a & " " & @error)