If you're getting a specific problem, be specific. What exception is being thrown? If you're handling the exception, then break into your debugger and tell us. "it's not letting me" tells me nothing. Also, see my other post. If this code is not running from the local machine (or the CAS user policy is more limited), code access security may be preventing the call to the registry class methods. Finally, I told you what the default permissions are. If you want to know what they are on your machine, then open regedit.exe, right-click on HKEY_LOCAL_MACHINE and select Permissions (if you don't see that, use regedt32.exe instead since this was a new UI feature in recent Windows OSes).
Microsoft MVP, Visual C# My Articles