The above worked on a Windows XP system... I just went and ran it on a Windows 2008 R2 system. It worked there also. The above creates the key. Once you have that, start adding your sub-keys and values. Let's see what code you are using.