Пример #1
0
        public static bool DeleteRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath, string keyName)
        {
            RegistryKey rootRegisterKey = WRegisterTool.GetRootRegisterKey(rootKeyType);
            RegistryKey registryKey     = rootRegisterKey.OpenSubKey(keyPath);

            if (WRegisterTool.IsKeyHaveSubKey(registryKey, keyName))
            {
                registryKey.DeleteSubKey(keyName);
                return(true);
            }
            return(false);
        }
Пример #2
0
        public static RegistryKey GetRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath)
        {
            RegistryKey rootRegisterKey = WRegisterTool.GetRootRegisterKey(rootKeyType);

            return(rootRegisterKey.OpenSubKey(keyPath, true));
        }
Пример #3
0
 public static RegistryKey CreateRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath)
 {
     WRegisterTool.GetRootRegisterKey(rootKeyType);
     return(WRegisterTool.CreateRegistryKey(rootKeyType, keyPath));
 }