/// <summary>
 /// Default constructor
 /// </summary>
 /// <param name="parentProcess">The parent process</param>
 public OSAE(string parentProcess)
 {
     ModifyRegistry myRegistry = new ModifyRegistry();
     myRegistry.SubKey = "SOFTWARE\\OSAE\\DBSETTINGS";
     DBConnection = myRegistry.Read("DBCONNECTION");
     DBPort = myRegistry.Read("DBPORT");
     DBName = myRegistry.Read("DBNAME");
     DBUsername = myRegistry.Read("DBUSERNAME");
     DBPassword = myRegistry.Read("DBPASSWORD");
     ComputerName = Dns.GetHostName();
     _parentProcess = parentProcess;
     APIpath = myRegistry.Read("INSTALLDIR");
 }
Exemple #2
0
        public static ActionResult Uninstall(Session session)
        {
            try
            {
                session.Log("Begin Uninstall CustomAction");

                OSAE.ModifyRegistry registry = new OSAE.ModifyRegistry();
                registry.BaseRegistryKey.DeleteSubKeyTree(@"SOFTWARE\OSAE", false);
            }
            catch (Exception ex)
            {
                session.Log("Exception Occured during custom action details:" + ex.Message);
            }

            return(ActionResult.Success);
        }
Exemple #3
0
        private void RemoveDB()
        {
            OSAE.ModifyRegistry myRegistry = new OSAE.ModifyRegistry();
            myRegistry.SubKey = @"SOFTWARE\OSAE\DBSETTINGS";

            string pass   = myRegistry.Read("DBPASSWORD");
            string user   = myRegistry.Read("DBUSERNAME");
            string port   = myRegistry.Read("DBPORT");
            string server = myRegistry.Read("DBCONNECTION");

            using (var connection = new MySqlConnection("server=localhost;user=root;password="******"drop schema if exists clusters";
                command.ExecuteNonQuery();

                command             = connection.CreateCommand();
                command.CommandText = "create schema clusters";
                command.ExecuteNonQuery();
            }
        }
Exemple #4
0
        private void RemoveDB()
        {
            OSAE.ModifyRegistry myRegistry = new OSAE.ModifyRegistry();
            myRegistry.SubKey = @"SOFTWARE\OSAE\DBSETTINGS";

            string pass = myRegistry.Read("DBPASSWORD");
            string user = myRegistry.Read("DBUSERNAME");
            string port = myRegistry.Read("DBPORT");
            string server = myRegistry.Read("DBCONNECTION");

            using (var connection = new MySqlConnection("server=localhost;user=root;password="******"drop schema if exists clusters";
                command.ExecuteNonQuery();

                command = connection.CreateCommand();
                command.CommandText = "create schema clusters";
                command.ExecuteNonQuery();
            }
        }
Exemple #5
0
        public static ActionResult Uninstall(Session session)
        {
            try
            {
                session.Log("Begin Uninstall CustomAction");

                OSAE.ModifyRegistry registry = new OSAE.ModifyRegistry();
                registry.BaseRegistryKey.DeleteSubKeyTree(@"SOFTWARE\OSAE", false);
            }
            catch (Exception ex)
            {
                session.Log("Exception Occured during custom action details:" + ex.Message);
            }

            return ActionResult.Success;
        }