public gfwLiveHandler() { RegistryHandler live = new RegistryHandler(RegRoot.local_machine,@"SOFTWARE\Classes\Software\Microsoft\XLive",false); if (live.key_found){ install_path = live.getValue("DashDir").TrimEnd('\\'); if (Directory.Exists(install_path)){ if (File.Exists(Path.Combine(install_path, "GFWLive.exe"))){ installed = true; DirectoryInfo data_dir, user_dir; gfw_user new_user; foreach(KeyValuePair<string,user_data> user in WindowsLocationHandler.users) { new_user.system_user = user.Value.name; data_dir = new DirectoryInfo(Path.Combine(user.Value.local_app_data,"Microsoft\\XLive\\Content")); if(data_dir.Exists) { foreach(DirectoryInfo directory in data_dir.GetDirectories()) { new_user.user_hex = directory.Name.Substring(0,8); new_user.machine_hex = directory.Name.Substring(8,8); new_user.account_path = directory.FullName; new_user.name = "Names not supported"; //users.Add(directory.Name,new_user); user_dir = new DirectoryInfo(Path.Combine(directory.FullName,"FFFE07D1\\00010000\\" + directory.Name + "_MountPt")); } } } }else{ install_path = null; } }else{ install_path = null; } } }
public MonitorHandler() { if(!Core.all_users_mode) { if(File.Exists(Core.programs.monitor)) { monitor_found = true; monitor_path = Core.programs.monitor; } else { monitor_found = false; } } else { monitor_found = false; } RegistryHandler reg = new RegistryHandler(RegRoot.current_user,@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",false); if (reg.getValue("MASGAUMonitor")!=null) monitor_enabled = true; else monitor_enabled = false; }
public StartupHelper(string name, string program) { this.name = name; this.program = program; reg = new RegistryHandler("current_user", @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); }