Some initial ideas - check the @SERROR result after the read and write calls. In particular, make sure you aren't getting an Access Denied message.

Also, you're writing a DWORD, which is numeric. Don't enclose the value in quotes, which forces the value to be a string.

Couple of other thoughts:
What kind of remote computer?
Is it a 32 or 64 bit O/S?
Is remote-registry disabled by GPO or other security measure?
Does it work when logged in locally?

Glenn
_________________________
Actually I am a Rocket Scientist! \:D