/// <summary>
/// 创建注册表,并修改注册表信息,修改后打开注册表编辑器,并且定位到指定项
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
RegistryKey rklm = Registry.LocalMachine;
RegistryKey rkhw = rklm.OpenSubKey(@"HARDWARE",true);
RegistryKey rkc=rkhw.CreateSubKey(@"MWX");
rkc.SetValue("value", "Ma");
MessageBox.Show("OK");
RegistryKey openRegditKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit", true);
openRegditKey.SetValue("LastKey",rkc);
System.Diagnostics.Process.Start("regedit.exe");
/// 创建注册表,并修改注册表信息,修改后打开注册表编辑器,并且定位到指定项
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void button1_Click(object sender, EventArgs e)
{
RegistryKey rklm = Registry.LocalMachine;
RegistryKey rkhw = rklm.OpenSubKey(@"HARDWARE",true);
RegistryKey rkc=rkhw.CreateSubKey(@"MWX");
rkc.SetValue("value", "Ma");
MessageBox.Show("OK");
RegistryKey openRegditKey = Registry.CurrentUser.OpenSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit", true);
openRegditKey.SetValue("LastKey",rkc);
System.Diagnostics.Process.Start("regedit.exe");