Exemple #1
0
 public static bool DeleteValue(string key, string value)
 {
     try
     {
         RegKey regKey = RegKey.Parse(key, true);
         regKey.Key.DeleteValue(value, false);
     }
     catch
     {
         return(false);
     }
     return(true);
 }
Exemple #2
0
 public static bool DeleteKey(string key)
 {
     try
     {
         RegKey child  = RegKey.Parse(key);
         RegKey parent = RegKey.Parse(child.Parent, true);
         parent.Key.DeleteSubKeyTree(child.Name);
     }
     catch
     {
         return(false);
     }
     return(true);
 }