Here's what I have so far, but it just keeps using the catch and the key is never deleted.
private void button7_Click(object sender, EventArgs e)
{
try
{
Microsoft.Win32.Registry.LocalMachine.DeleteSubKey(@"Software/Microsoft/Windows/CurrentVersion/Policies");
}
catch
{
MessageBox.Show("Restrictions already removed. Or there was an error.","Information", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
What is wrong with my code?