private void bt_LERC_online_Click(object sender, EventArgs e) { bool server = false; if (cb_AgentType.SelectedIndex == 1) { server = true; } var commandLine = @"\\" + Computername + @"\admin$\System32\msiexec.exe -i \\" + Computername + @"\c$\tmp\lercSetup.msi /qn /l lerc_install.log company=2 reconnectdelay=60 chunksize=2048 serverurls=https://control.integraldefense.com/"; bt_LERC_online.Enabled = false; if (BEFunctions.copyCB(Computername, server)) { tb_Display.AppendText("LERC Package copied."); tb_Display.AppendText(Environment.NewLine); } var returnval = BEFunctions.installCB(Computername, commandLine); if (returnval != -1) { tb_Display.AppendText(String.Format("CB Package installer started, Process ID {0}.", returnval)); tb_Display.AppendText(Environment.NewLine); } }
private void bt_Execute_Click(object sender, EventArgs e) { bt_Execute.Enabled = false; foreach (DataGridViewRow row in dataGridView1.Rows) { Task resultTask = Task.Factory.StartNew(() => { try { if (row.Cells[2].Value.ToString() == "True") { bool server = false; if (cb_AgentType.SelectedIndex == 1) { server = true; } row.Cells[4].Value = "Copying"; BEFunctions.copyCB((row.Cells[0].Value.ToString()), server); row.Cells[4].Value = "Unzipping"; BEFunctions.unZipCB((row.Cells[0].Value.ToString())); row.Cells[4].Value = "Installing"; var commandLine = @"\\" + row.Cells[0].Value.ToString() + @"\admin$\System32\msiexec.exe -i \\" + row.Cells[0].Value.ToString() + @"\c$\tmp\cbsetup.msi /qn"; BEFunctions.installCB((row.Cells[0].Value.ToString()), commandLine); } } catch { } }); } }
private void bt_Install_Click(object sender, EventArgs e) { bool server = false; if (cb_AgentType.SelectedIndex == 1) { server = true; } var commandLine = @"\\" + Computername + @"\admin$\System32\msiexec.exe -i \\" + Computername + @"\c$\tmp\cbsetup.msi /qn /L*v \\" + Computername + @"\c$\tmp\cbsetup.log"; bt_Install.Enabled = false; if (BEFunctions.copyCB(Computername, server)) { tb_Display.AppendText("CB Package copied."); tb_Display.AppendText(Environment.NewLine); Thread.Sleep(500); } if (BEFunctions.unZipCB(Computername)) { tb_Display.AppendText("CB Package unzipped."); tb_Display.AppendText(Environment.NewLine); Thread.Sleep(500); } var returnval = BEFunctions.installCB(Computername, commandLine); if (returnval != -1) { tb_Display.AppendText(String.Format("CB Package installer started, Process ID {0}.", returnval)); tb_Display.AppendText(Environment.NewLine); } }