I am writing an app in this app it runs the same process over and over. but I want to wait in between it running the process. what i have is. I can not get this to wait for osql.exe to quit. if i run it like this it sends an out of bounds error. how can i easily make it wait for osql.exe to quit before it starts the next instance???? BTW i need to put that i did not start this process in the program it is being started by a script. the script dows not sow up as a process.
if(checkbox1 == true)
{
//it will run this process in this case it is osql.exe
}
Process p = Process.GetProc essByName("osql .exe")[0];
p.waitForExit() ;
if(checkbox2 == true)
{
//it runs osql
if(checkbox1 == true)
{
//it will run this process in this case it is osql.exe
}
Process p = Process.GetProc essByName("osql .exe")[0];
p.waitForExit() ;
if(checkbox2 == true)
{
//it runs osql
Comment