I am getting error cannot write to the registry key when i am trying to save my keys in the registry .
//Here is my code .
Note : I tried to run as an Admin
Try this:
RegistryKey skms = SoftwareKey.OpenSubKey(RegistryKeyName, true);
The second parameter should be set to true if you need write access to the key.
-EDIT-
On 64-bit system, you can try this (if you are using .Net 4):
private readonly RegistryKey SoftwareKey =
RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).
OpenSubKey("SOFTWARE");