Shell is a VB6 team; it is not an ideal way to start processes.
The correct way in .NET to call a process and wait for it:
Dim aroras as Process = Process.Start("C:\VTS\arorasTEMP.bat")
aroras.WaitForExit()
' error code is available in aroras.ExitCode, if you need it
You can also force kill him if it takes too long:
If Not aroras.WaitForExit(300) Then
aroras.Kill()
End If
(where 300 is the timeout in milliseconds)
source
share