A
A
Hi all,
This is sort of a newbie question. I have a method that creates a process
which in turn installs MSDE. Basically, after I start the process I need to
wait until it is complete and then reboot the machine. Problem is that I am
unsure of knowing exactly when the process has completed since any code
placed after the proc.Start() method executes asynchronously. I am not
certain if what I need to do is implement some sort of callback, or if there
is some way to handle this through the process class directly. Can anyone
give me some help? Code is below:
private void doSomething()
{
Process proc = new Process();
ProcessStartInfo info = new ProcessStartInfo(selectedDrive + @"MSDE2000
ReleaseA\Setup.exe", @"INSTANCENAME=Test SECURITYMODE=SQL
SAPWD=DISABLENETWORKPROTOCOLS=0");
proc.StartInfo = info;
proc.Start();
}
This is sort of a newbie question. I have a method that creates a process
which in turn installs MSDE. Basically, after I start the process I need to
wait until it is complete and then reboot the machine. Problem is that I am
unsure of knowing exactly when the process has completed since any code
placed after the proc.Start() method executes asynchronously. I am not
certain if what I need to do is implement some sort of callback, or if there
is some way to handle this through the process class directly. Can anyone
give me some help? Code is below:
private void doSomething()
{
Process proc = new Process();
ProcessStartInfo info = new ProcessStartInfo(selectedDrive + @"MSDE2000
ReleaseA\Setup.exe", @"INSTANCENAME=Test SECURITYMODE=SQL
SAPWD=DISABLENETWORKPROTOCOLS=0");
proc.StartInfo = info;
proc.Start();
}