I have designed a Windows Form in C#. There are 3 check boxes
i.e.
Checkbox1 - Install .NET Framework
Checkbox2 - Install Ajax Extension Setup
Checkbox3 - Install Application Setup
at the end Install Button.
On clicking on Install, All the checked options should automatically install..
[There is one particular folder to keep required exe setup files]
Please Advice me..
Regards
Lokesh
Denis ElkhovPosted Oct 21, 2008, 8:59 AM
You should use threads.
Here is a simple code you need:
System.Diagnostics.ProcessStartInfo startNetInstall;
System.Diagnostics.ProcessStartInfo startAjaxInstall;
System.Diagnostics.ProcessStartInfo startAppInstall;
System.Diagnostics.Process pStart
if (CheckBoxNetInstall.Checked == true)
{
startNetInstall = new System.Diagnostics.ProcessStartInfo("NetInstall.exe");
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardOutput = true;
pStart = new Process();
pStart.StartInfo = startNetInstall;
pStart.Start();
pStart.WaitForExit();
pStart.Close();
pStart.Dispose();
}
if (CheckBoxAjaxInstall.Checked == true)
{
startNetInstall = new System.Diagnostics.ProcessStartInfo("AjaxInstall.exe");
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardOutput = true;
pStart = new Process();
pStart.StartInfo = startAjaxInstall;
pStart.Start();
pStart.WaitForExit();
pStart.Close();
pStart.Dispose();
}
if (CheckBoxAppInstall.Checked == true)
{
startNetInstall = new System.Diagnostics.ProcessStartInfo("AppInstall.exe");
startInfo.UseShellExecute = false;
startInfo.RedirectStandardInput = true;
startInfo.RedirectStandardOutput = true;
pStart = new Process();
pStart.StartInfo = startAppInstall;
pStart.Start();
pStart.WaitForExit();
pStart.Close();
pStart.Dispose();
}