I want to use the VB6 command line compiler to compile a project I have that I need to compile 3 times with different conditional compilation arguments.

I got the command line compiler to work, but if I call it 3 times in a row, it only builds the first one and the second 2 fail because its still compiling the first one.

What method can I use to determine when the first compilation is done, so that the code can then call the second, and then the third.