Exemple #1
0
 public static bool DeleteRegistryValue(RegistryKey key, string keyValueName)
 {
     if (WRegisterTool.IsKeyHaveValue(key, keyValueName))
     {
         key.DeleteValue(keyValueName);
         return(true);
     }
     return(false);
 }
Exemple #2
0
        public static string GetRegistryValue(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyName)
        {
            RegistryKey registryKey = WRegisterTool.GetRegistryKey(rootKeyType, keyPath);

            if (WRegisterTool.IsKeyHaveValue(registryKey, keyName))
            {
                return(registryKey.GetValue(keyName).ToString());
            }
            return(null);
        }
Exemple #3
0
        public static bool DeleteRegistryValue(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyValueName)
        {
            RegistryKey registryKey = WRegisterTool.GetRegistryKey(rootKeyType, keyPath);

            if (WRegisterTool.IsKeyHaveValue(registryKey, keyValueName))
            {
                registryKey.DeleteValue(keyValueName);
                return(true);
            }
            return(false);
        }