Looks like you don't need this info now but perhaps may help in the future.

You could have just had your program call the bat file you originally mentioned.