Did you try looking at API code to write the registry?

Creating a .Reg file is okay I did when I didn't know how.

I'm not even sure if Sendkeys will work...if it doesn't let me know I have the source code for this at work.

-Ober