Exemple #1
0
 internal static string GetMainOffRegPath(KeyIdentity identity)
 {
     if (!predefinedPaths_.ContainsKey((Int64)identity.BaseKey))
     {
         // Not thrown in usual cases, may be thrown very rarely if identity.BaseKey
         // points to some specific place (may be)
         throw new FileNotFoundException();
     }
     return(KeyIdentity.CombinePaths(predefinedPaths_[(Int64)identity.BaseKey][0], identity.GetRegPath()));
 }
Exemple #2
0
        internal static List <string> GetOffRegPaths(KeyIdentity identity)
        {
            if (!predefinedPaths_.ContainsKey((Int64)identity.BaseKey))
            {
                return(new List <string>());
            }
            List <string> result    = new List <string>();
            List <string> basePaths = predefinedPaths_[(Int64)identity.BaseKey];
            string        regPath   = identity.GetRegPath();

            foreach (string basePath in basePaths)
            {
                // offreg hive does not distinguish between 32bit and 64 bit branches for now
                // so we use path w/o Wow6432Node
                result.Add(KeyIdentity.CombinePaths(basePath, regPath));
            }
            return(result);
        }