如何在没有管理员权限的情况下执行此代码?
RegistryKey key = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
private void button1_Click(object sender, EventArgs e)
{
key.SetValue("DisableTaskMgr", 1);
}
private void button2_Click(object sender, EventArgs e)
{
Registry.CurrentUser.DeleteSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System");
// Or you can change the key value to 0
}