>Been a long time and I can't recall, How to redirect output from batch file to a log file?
>
You can either redirect the STDOUT for the command processor controlling the .BAT file (best done using the CreateProcess() API call; you could modify API_APPRUN to do that), or use the > and >> pipes to direct console output to a file line by line within the file.