Checking to see if batch file ran from Start Process activity has errors

I have a Start Process activity I’m using to run a batch file. I also have a Http Request activity that follows the Start Process activity. I’d like to not run the Start Process activity based on whether the batch file has errors in it or not. I’m struggling to figure out how to accomplish this and would appreciate any feedback.

Currently in my batch file I’m using the following line - “EXIT /B 1” to try to throw an error in the batch file for testing.

Any help is appreciated and thanks in advance!

@bdallman

One way to acheive is to copy the batch file code into invoke powershell and run from there and it would have output variables which can be verified

Another way is to invlude a line of code in batch file itself to write success key word into a notepad when the batch file is successful and using UiPath we can read the file and check if the keyword is success or not…if auccess then process else it means the batch file failed

Cheers