Registry access problem with C#

  • Thread starter Thread starter Emily
  • Start date Start date
E

Emily

Hi All,

Having problem using the registry from C#... The key will be created but the
value won't.

My code:

RegistryKey rk = Registry.CurrentUser;
rk.OpenSubKey(@"Software\MyApp", true);
rk.SetValue("ValueTest", "This is the value");
rk.Flush();
rk.Close();

It's just refusing to create the value... No error is thrown, and the key is
being created fine.

Using Visual Studio 2003 .NET Framework 1.1.4322 SP1

Any ideas?
 
Back
Top