예제 #1
0
 public static void MoveUnifiedInstallerRegistryFromWow64()
 {
     try
     {
         RegistryKey registryKey1 = Registry.LocalMachine.OpenSubKey(Strings.RegistryBaseKeyPath);
         if (registryKey1 != null && !string.IsNullOrEmpty((string)registryKey1.GetValue("Version", (object)null)))
         {
             return;
         }
         RegistryKey registryKey2 = Registry.LocalMachine.OpenSubKey("Software", true);
         RegistryKey sourceKey    = Registry.LocalMachine.OpenSubKey("Software\\WOW6432Node\\BlueStacks" + Strings.GetOemTag());
         if (sourceKey == null)
         {
             return;
         }
         RegistryKey subKey = registryKey2.CreateSubKey("BlueStacks" + Strings.GetOemTag());
         RegistryUtils.RecurseCopyKey(sourceKey, subKey);
         registryKey2.DeleteSubKeyTree("WOW6432Node\\BlueStacks" + Strings.GetOemTag());
         RegistryUtils.GrantAllAccessPermission(subKey);
     }
     catch
     {
     }
 }
예제 #2
0
 private static string GetLogDir()
 {
     using (RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(string.Format((IFormatProvider)CultureInfo.InvariantCulture, "Software\\BlueStacks{0}", (object)Strings.GetOemTag())))
     {
         if (registryKey != null)
         {
             Logger.s_logDir = (string)registryKey.GetValue("LogDir", (object)"");
         }
         if (string.IsNullOrEmpty(Logger.s_logDir))
         {
             Logger.s_logDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
             Logger.s_logDir = Path.Combine(Logger.s_logDir, "Bluestacks\\Logs");
         }
     }
     return(Logger.s_logDir);
 }