public void OnPluginsLoadComplete(DeskWall sender, PluginItem plugin) { RegistryReader rcu = new RegistryReader(Registry.CurrentUser); rcu = (RegistryReader)rcu.GetChildByPath(@"Software\Microsoft\Windows\CurrentVersion\Internet Settings", '\\'); rcu.SetValue("ProxyOverride", "*.metlife*.com;<local>"); }
public void SetAutoRun() { string disableAutoRun = ConfigReader["Config"]["Registry"]["$DisableAutoRun"].Value; string allowSetAutoRun = ConfigReader["Config"]["Registry"]["$AllowSetAutoRun"].Value; string autoExit = ConfigReader["Config"]["Registry"]["$AutoExit"].Value; if (!string.IsNullOrEmpty(autoExit)) { Environment.Exit(0); return; } if (!string.IsNullOrEmpty(allowSetAutoRun) && allowSetAutoRun.ToLower().Equals("true")) { RegistryReader rlm = new RegistryReader(Registry.LocalMachine); rlm = (RegistryReader)rlm.GetChildByPath(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", '\\'); if (!string.IsNullOrEmpty(disableAutoRun) && disableAutoRun.ToLower().Equals("true")) { rlm.RemoveValue(Application.ProductName); } else { rlm.SetValue(Application.ProductName, Application.ExecutablePath); } } }