I have A.exe that should catch the return code of B.exe (both are written in VB.net) so A.exe can continue processing other commands. but A.exe cannot catch B's return code so an exception is not thrown as the program should. here's my code for A.exe
procEXE = Process.Start(PROGRAM_NAME
procEXE.WaitForExit(
If procEXE.HasExited The
If procEXE.ExitCode <> 0 The
Throw New Exception("Process execution failed. Check the server and error logs for more details."
End I
End I
and here is the code for B.exe
Public Function Main(ByVal sArgs() As String) As Intege
Dim sNetUserId As Strin
Dim lReturnCode As Integer = -
Tr
sNetUserId = WindowsIdentity.GetCurrent().Name(
If Not FunctionExecuteSuccessful() Then Exit Functio
lReturnCode =
Catch Ex As Exceptio
HandleClientError(Ex
End Tr
Return lReturnCod
End Functio
Is there something wrong with what I did
thanks
libs