It's all down to Windows Security, In Windows, in order to modify the registry you must be a (power user?)/administrator.
.NET Talks to Windows, querying if the user has permission to do certain things, in this case modifying the registry. If Windows reports "no, user has insufficient privileges" then you will not be able to modify the registry
perhaps there is another way for you - what exactly are you storing in the registry? maybe you can store this in some other way without the need of the registry?