in reply to Adding values to registry

your code should work, as works mine in such situations

I can advice you following:

Courage, the Cowardly Dog.