Redirect log output using Hardcoded C batch script

60 Views Asked by At

I try to execute following "unknown.exe" command in CVI platform (as C code batch script) and redirect those command output in a log file.

sprintf(szCommand, "%s > D:\\log.txt 2>&1", "D:\\unknown.exe");
system(szCommand);

When I run the script, the exe file can execute but its failed to obtain the output "log file".

I don't understand what went wrong here.

0

There are 0 best solutions below