Enable/Disable TaskManager
问题 public static void ToggleTaskManager(string keyValue) { RegistryKey objRegistryKey = Registry.CurrentUser.CreateSubKey("Software\\Microsoft\\Windows\\CurrentVersion\\Policies\\System"); objRegistryKey.SetValue("DisableTaskMgr", keyValue); objRegistryKey.Close(); } private void btnDisableTaskManager_Click(object sender, EventArgs e) { ConsoleDisplay.ToggleTaskManager("1"); } private void btnEnableTaskManager_Click(object sender, EventArgs e) { ConsoleDisplay.ToggleTaskManager("0"); } For