string keyName = @"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run";//Path of Key,You can specify full path using (RegistryKey key = Registry.CurrentUser.OpenSubKey(keyName, true)) { if (key == null) { // Key doesn't exist. Do whatever you want to handle // this case } else { key.DeleteValue("Value"); } }
using System.Security.Permissions; using Microsoft.Win32;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)