Can you share the code that you're attempting to use the registry path from? It would be good to see how you're trying to use it... perhaps there's a better way that wouldn't have that problem.
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.