Ejemplo n.º 1
0
        private void btnUninstall_Click(object sender, EventArgs e)
        {
            var comd2 = "net stop  \"" + txtName.Text + "\"";

            ExecuteCommandLine.ExecuteCommand(comd2);

            var comd = "sc delete \"" + txtName.Text + "\"";

            ExecuteCommandLine.ExecuteCommand(comd);
            //btnInstall.Enabled = true;
            //btnUninstall.Enabled = false;
            var frmSuccess = new InformationForm();

            frmSuccess.Show();
        }
Ejemplo n.º 2
0
        private void btnInstall_Click(object sender, EventArgs e)
        {
            var comd1 = "sc.exe create " + txtName.Text + " binPath= \"" + txtPath.Text + "\"";

            ExecuteCommandLine.ExecuteCommand(comd1);

            var comd2 = "net start \"" + txtName.Text + "\"";

            ExecuteCommandLine.ExecuteCommand(comd2);

            //btnInstall.Enabled = false;
            //btnUninstall.Enabled = true;
            var frmSuccess = new InformationForm();

            frmSuccess.Show();
        }