public static NamedKey[] GetInstancesRecurse(string path) { byte[] bytes = RegistryHelper.GetHiveBytes(path); NamedKey hiveroot = RegistryHelper.GetRootKey(path); return(GetInstances(bytes, hiveroot, true)); }
public ValueKey[] GetValues() { if (NumberOfValues > 0) { byte[] bytes = RegistryHelper.GetHiveBytes(this.HivePath); return(GetValues(bytes)); } throw new Exception(string.Format("The key '{0}' has no associated values", this.FullName)); }
public static NamedKey[] GetInstances(string path, string key) { if (key == null) { return(NamedKey.GetInstances(RegistryHelper.GetHiveBytes(path), path)); } else { return(NamedKey.GetInstances(RegistryHelper.GetHiveBytes(path), path, key.TrimEnd('\\'))); } }
public NamedKey[] GetSubKeys() { if (NumberOfSubKeys > 0) { byte[] bytes = RegistryHelper.GetHiveBytes(HivePath); return(GetSubKeys(bytes)); } else { return(null); } }
public static ValueKey Get(string path, string key, string val) { byte[] bytes = RegistryHelper.GetHiveBytes(path); NamedKey hiveroot = RegistryHelper.GetRootKey(bytes, path); NamedKey nk = hiveroot; if (key != null) { foreach (string k in key.Split('\\')) { foreach (NamedKey n in nk.GetSubKeys(bytes)) { if (n.Name.ToUpper() == k.ToUpper()) { nk = n; } } } if (nk == hiveroot) { throw new Exception(string.Format("Cannot find key '{0}' in the '{1}' hive because it does not exist.", key, path)); } } ValueKey[] values = nk.GetValues(bytes); foreach (ValueKey v in values) { if (v.Name.ToUpper() == val.ToUpper()) { return(v); } } throw new Exception(string.Format("Cannot find value '{0}' as a value of '{1}' in the '{2}' hive because it does not exist.", val, key, path)); }
public static ValueKey[] GetInstances(string path, string key) { byte[] bytes = RegistryHelper.GetHiveBytes(path); NamedKey hiveroot = RegistryHelper.GetRootKey(bytes, path); NamedKey nk = hiveroot; if (key != null) { foreach (string k in key.Split('\\')) { foreach (NamedKey n in nk.GetSubKeys(bytes)) { if (n.Name.ToUpper() == k.ToUpper()) { nk = n; } } } } return(nk.GetValues(bytes)); }
public object GetData() { return(this.GetData(RegistryHelper.GetHiveBytes(this.HivePath))); }
public SecurityDescriptor GetSecurityKey() { byte[] bytes = RegistryHelper.GetHiveBytes(this.HivePath); return(GetSecurityKey(bytes)); }
public static NamedKey Get(string path, string key) { return(NamedKey.Get(RegistryHelper.GetHiveBytes(path), path, key.TrimEnd('\\'))); }