Create a batch file. Eg
Code:
@echo off
someprogram.exe > output.txt

Results are in the output.txt
Your script should create the batch file if needed