You can do this very simple with powershell.It's available on every windows-system.
Then you can start you programm with the command start-process documentation
Here you can redirect stdout an stderr very easy to a file.
If you want to redirect the stdout to a variable you can run your programm like that.
- open cmd
- type
powershell
$outFromParent = $(parent.exe)
Or if you want to redirect to a file
PS c:> parent.exe > theOutFile.txt
Update
If this not work then you can try the folowing.
PS c:\>$out = & parant.exe
PS c:\>$out
OR
PS c:\>Write-Host $out
If this not works you can try the Start-Process. See the example.
Or look at here
PS C:\> Start-Process -FilePath "parant.exe" -RedirectStandardInput "testin.txt" -RedirectStandardOutput "testout.txt" -RedirectStandardError "testerror.txt"
Note if you start an application that need elevated rights then all of these methods only work if you use an andmistrator powershell.
Hope this helps.