Esempio n. 1
0
        public static TypedUrls[] Get(string hivePath)
        {
            if (RegistryHelper.isCorrectHive(hivePath, "NTUSER.DAT"))
            {
                string Key = @"Software\Microsoft\Internet Explorer\TypedUrls";

                byte[] bytes = Registry.RegistryHelper.GetHiveBytes(hivePath);

                NamedKey nk = NamedKey.Get(bytes, hivePath, Key);

                TypedUrls[] urls = new TypedUrls[nk.NumberOfValues];

                foreach (ValueKey vk in nk.GetValues(bytes))
                {
                    for (int i = 0; i < urls.Length; i++)
                    {
                        urls[i] = new TypedUrls(RegistryHelper.GetUserHiveOwner(hivePath), (string)vk.GetData(bytes));
                    }
                }
                return(urls);
            }
            else
            {
                throw new Exception("Invalid NTUSER.DAT hive provided to -HivePath parameter.");
            }
        }
Esempio n. 2
0
        public static TypedUrls[] Get(string hivePath)
        {
            if (RegistryHelper.isCorrectHive(hivePath, "NTUSER.DAT"))
            {
                string Key = @"Software\Microsoft\Internet Explorer\TypedUrls";

                byte[] bytes = Registry.RegistryHelper.GetHiveBytes(hivePath);

                NamedKey nk = NamedKey.Get(bytes, hivePath, Key);

                TypedUrls[] urls = new TypedUrls[nk.NumberOfValues];

                foreach (ValueKey vk in nk.GetValues(bytes))
                {
                    for (int i = 0; i < urls.Length; i++)
                    {
                        urls[i] = new TypedUrls(RegistryHelper.GetUserHiveOwner(hivePath), (string)vk.GetData(bytes));
                    }
                }
                return urls;
            }
            else
            {
                throw new Exception("Invalid NTUSER.DAT hive provided to -HivePath parameter.");
            }
        }