public static void StartUp() // Autoiniciar al iniciar sesión { Console.WriteLine("\n[StartUp] En proceso...\n"); RegistryTools R = new RegistryTools(); const string PathA = @"Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; if (R.CreateKeyValue_String(PathA, config.NAME_REG, config.PATH_OCUL + @"\" + config.NAME_EXE) != "E#RR04") { Console.WriteLine("[StartUp] REG Machine - Finish"); Console.WriteLine(R.CreateKeyValue_String(PathA, config.NAME_REG, config.PATH_OCUL + @"\" + config.NAME_EXE)); } else { const string Path = @"Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; R.CreateKeyValue_String(Path, config.NAME_REG, config.PATH_OCUL + @"\" + config.NAME_EXE); Console.WriteLine("[StartUp] REG USER - Finish"); } Console.WriteLine("\n[StartUp] Finish\n"); }
} //Finish public void CreateKeyValue_String() { Console.Clear(); Console.SetCursorPosition(45, 2); // Inicio Console.WriteLine("Crear valores de llave- Tipo String"); Console.WriteLine(""); String path = SetPath(); String valueName = SetValueName(); Console.Clear(); Console.WriteLine("Ingrese el Dato del Valor: "); String valueData = Console.ReadLine(); Console.Clear(); Console.WriteLine(registro.CreateKeyValue_String(path, valueName, valueData)); Console.ReadKey(); } //Finish