Microsoft.Win32.RegistryKey Hkml=Microsoft.Win32.Registry.LocalMachine;
Microsoft.Win32.RegistryKey HkSystem=Hkml.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run");
if(HkSystem!=null)
{
MessageBox.Show("注册表成功修改!");
HkSystem.SetValue("getprocess","f:\\获取进程信息.exe");
string[] Reg=new string[100];
Reg=HkSystem.GetValueNames();
int i=0;
foreach(string r in Reg)
{
this.richTextBox1.AppendText(r+"="+HkSystem.GetValue(Reg[i])+"\n");
i++;
}
}
else
MessageBox.Show("修改失败!!");
Hkml.Close();