RegistryKey HKLM = Registry.LocalMachine;
RegistryKey Run = HKLM.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
Run.SetValue("QQ", AppRunPath + "QQ.exe");
HKLM.Close();
RegistryKey Run = HKLM.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
Run.SetValue("QQ", AppRunPath + "QQ.exe");
HKLM.Close();
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、阅读注册数据
http://www.sunxin.org/forum/thread/16312.html
去看看 应该可以解决