G
GerardCC
Hi,
Simple question: when the following code is executed the process is NOT
ready after the call WaitForExit
_________
Dim shellProc As Process
Dim procStartInfo As New ProcessStartInfo(JobToDo, args)
'Start the process and wait for the results
procStartInfo.UseShellExecute = True
procStartInfo.CreateNoWindow = True
procStartInfo.WindowStyle = ProcessWindowStyle.Hidden
procStartInfo.RedirectStandardOutput = False
shellProc = Process.Start(procStartInfo)
shellProc.WaitForExit()
exitVal = shellProc.ExitCode()
shellProc.Close()
shellProc.Dispose()
____________
WaitForExit should wait indefinitly, but files are still created in a
directory when I retreive the ExitCode (the job started is a file splitter).
Anybody any idea what's wrong?
Thanks in advance,
Gerard
Simple question: when the following code is executed the process is NOT
ready after the call WaitForExit
_________
Dim shellProc As Process
Dim procStartInfo As New ProcessStartInfo(JobToDo, args)
'Start the process and wait for the results
procStartInfo.UseShellExecute = True
procStartInfo.CreateNoWindow = True
procStartInfo.WindowStyle = ProcessWindowStyle.Hidden
procStartInfo.RedirectStandardOutput = False
shellProc = Process.Start(procStartInfo)
shellProc.WaitForExit()
exitVal = shellProc.ExitCode()
shellProc.Close()
shellProc.Dispose()
____________
WaitForExit should wait indefinitly, but files are still created in a
directory when I retreive the ExitCode (the job started is a file splitter).
Anybody any idea what's wrong?
Thanks in advance,
Gerard