I'm not sure why it hasn't changed. You could try to also write to:

$keyroot="HKEY_CLASSES_ROOT\CLSID\"

with the rest being the same. I'm not sure why you should have to since this is just a copy of the other key. Open regedit and check both locations. If the one above hasn't changed, add it into the script and call WRITECLASS a second time.

Hope that helps!

------------------
Regards,

Brad
Consultant
Net InfraStructure, Inc