The test driver utility is fully automated for Windows. This can be enabled via the setting menu in the code profile window. All IO on the panels can be used as automated IO. Normally the data is streamed to a DOS box. To redirect the output, set the following environment variables to the file names that the data should be streamed to, or read from:
One way to do this is to create a small batch file to run before running the model.