process.waitfor() problems
I am writing a small C# menu program to facilitate installing several applications the image team forgot to add.
For the most part all the installations work fine using the Process Class. Two however did not function properly. They didn't seem to wait. I resolved this by determining that the installs started out with a self extrating routine. When this was completed my program continued even though the install was not complete. I used InstallMonitor to locate the extraction folder and copied the install files to my CD. Now these process do not run unless I comment out the process.waitfor() command. If this command is left in the whole thing (my app & install) hang. If I terminate my application the install starts. If I don't use waitfor() both installations work fine. The application installs are for SameTime and the Citrix Client Version 7.10.
Any suggestions on what would make the setup for these hang when using waitfor()
Code Snippet:
if (chkICAClient.Checked)
{
// Install ICA Client 7.10
System.Diagnostics.Process ICAClient = new System.Diagnostics.Process();
ICAClient.EnableRaisingEvents=false;
ICAClient.StartInfo.FileName= cmbDrive.SelectedItem.ToString() +"ICA Client 7.10\\Disk1\\"+"setup.exe";
sStatusLog = "ICA Client 7.10 Install Started";
UpdateLog();
try
{
ICAClient.Start();
ICAClient.WaitForExit();
if (sSuccess == "")
{
sSuccess = "ICA Client 7.10";
}
else
{
sSuccess = sSuccess + ", "+"ICA Client 7.10";
}
sStatusLog = "ICA Client 7.10 Install Completed";
UpdateLog();
}
catch (Exception)
{
MessageBox.Show("ICA Client 7.10 installation error.", "Install Status",
MessageBoxButtons.OK, MessageBoxIcon.Error);
bOops = true;
if (sFailure == "")
{
sFailure = "ICA Client 7.10";
}
else
{
sFailure = sFailure + ", "+"ICA Client 7.10";
}
sStatusLog = "ICA Client 7.10 Install Failed";
UpdateLog();
return;
}
}
Mike
|