The return code from the Run function only indicates that it was able to start the external program, in this case the DOS session that runs the command file. The Run function returns immediately and the next line of code is executed, it doesn't wait for the external program to finish.
I have a code example of RunAndWait which also can give you a return code from the external program.
Add comment