public static TypedPaths[] Get(string hivePath) { if (RegistryHelper.isCorrectHive(hivePath, "NTUSER.DAT")) { string Key = @"Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths"; byte[] bytes = Registry.RegistryHelper.GetHiveBytes(hivePath); NamedKey nk = NamedKey.Get(bytes, hivePath, Key); TypedPaths[] paths = new TypedPaths[nk.NumberOfValues]; int i = 0; foreach (ValueKey vk in nk.GetValues(bytes)) { paths[i] = new TypedPaths(RegistryHelper.GetUserHiveOwner(hivePath), (string)vk.GetData(bytes)); i++; } return(paths); } else { throw new Exception("Invalid NTUSER.DAT hive provided to -HivePath parameter."); } }
public static TypedPaths[] Get(string hivePath) { if (RegistryHelper.isCorrectHive(hivePath, "NTUSER.DAT")) { string Key = @"Software\Microsoft\Windows\CurrentVersion\Explorer\TypedPaths"; byte[] bytes = Registry.RegistryHelper.GetHiveBytes(hivePath); NamedKey nk = NamedKey.Get(bytes, hivePath, Key); TypedPaths[] paths = new TypedPaths[nk.NumberOfValues]; int i = 0; foreach (ValueKey vk in nk.GetValues(bytes)) { paths[i] = new TypedPaths(RegistryHelper.GetUserHiveOwner(hivePath), (string)vk.GetData(bytes)); i++; } return paths; } else { throw new Exception("Invalid NTUSER.DAT hive provided to -HivePath parameter."); } }