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); }
public static RegistryKey GetRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath) { RegistryKey rootRegisterKey = WRegisterTool.GetRootRegisterKey(rootKeyType); return(rootRegisterKey.OpenSubKey(keyPath, true)); }
public static RegistryKey CreateRegistryKey(WRegisterTool.WRegisterRootKeyType rootKeyType, string keyPath) { WRegisterTool.GetRootRegisterKey(rootKeyType); return(WRegisterTool.CreateRegistryKey(rootKeyType, keyPath)); }