RegistryKey HKLM = Registry.LocalMachine;
RegistryKey Run = HKLM.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
Run.SetValue("QQ", AppRunPath + "QQ.exe");
HKLM.Close();

解决方案 »

  1.   

    只是刚刚自己写的一个小例子,主要有两个类Registry 和RegistryKey,在Microsoft.Win32这个命名空间中
     RegistryKey key = Registry.LocalMachine;
                RegistryKey software = key.OpenSubKey("software");
                
                try
                {
                   
                    foreach (string k in software.GetSubKeyNames())
                    {
                        Console.WriteLine(k);
                    }            }
                catch (Exception ex)
                {
                    Console.WriteLine(ex.Message);
                }
                finally
                {
                    software.Close();
                }
      

  2.   

    1、增加注册表数据
    2、阅读注册数据
    http://www.sunxin.org/forum/thread/16312.html
    去看看 应该可以解决