RegistryKey.OpenSubKey(string) does not open the key for writing. Try using the OpenSubKey(string, bool) overload to specify that you want the key to be writable.
RegistryKey.OpenSubKey(string) does not open the key for writing. Try using the OpenSubKey(string, bool) overload to specify that you want the key to be writable.