A couple questions:

1. Should it be REG_SZ or REG_EXPAND_SZ?

2. What kind of client operating systems are you running? Secure operating systems like Windows NT may not accept registry settings if the user is not a local administrator.

3. Have you tried using @ERROR and @SERROR to return values if your WRITEVALUE is failing?

4. Have you tried running just the WRITEVALUE portion of the script from a local drive on the PC to see if it works as intended?

Brian