private static void UnregisterDebuggerKeys(string registryPath, string debuggerKey, string launchSettingKey) { using (RegistryKey keyPath = Registry.LocalMachine.OpenSubKey(registryPath, true)) { if (keyPath != null) { RegistryUtilities.RollbackKey(keyPath, debuggerKey); RegistryUtilities.RollbackKey(keyPath, launchSettingKey); } } }
private static void UnregisterWerKeys() { using (RegistryKey key = Registry.LocalMachine.OpenSubKey(werRegistryPath, true)) { if (key != null) { RegistryUtilities.RollbackKey(key, werDisabledKey); RegistryUtilities.RollbackKey(key, werDontShowUIKey); } } }