
use nmake build a project in my program
Quote:
>Hi
>I do like this:
>if(ShellExecute(NULL,"open","nmake.exe",".\\aaa\\aaa.mak
>>>a.txt",".\\aaa",SW_SHOWNORMAL)<=HINSTANCE(32))
> AfxMessageBox("build fail");
>Nmake.exe can execute,but work incorrect.a.txt dosn't create.Why?
Redirection of stdout is a feature of the command
processor. ShellExecute does not invoke the command
processor.
You can do this if you invoke the command processor
explicitly; call CMD.EXE or Command.com and
pass the command line to it.