禁用注册表:
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
RegistryKey rgK = Registry.CurrentUser.CreateSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); rgK.SetValue("DisableRegistryTools", 1, RegistryValueKind.DWord); MessageBox.Show("禁用成功!!!");
启用注册表
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
RegistryKey rgK = Registry.CurrentUser; rgK.DeleteSubKey(@"Software\Microsoft\Windows\CurrentVersion\Policies\System"); MessageBox.Show("启用成功!!!");