now ,I develope a app on xp ,i run it on server2003.It can run normally .when i use app to invoke a batch ,problems come here. The batch can not run rightly.In batch file ,some commands can run ,some commands can not run,for example ,find command can not, findstr can .Because app using mfc.so I using "createprocess "function,in this ,i can create pipe and get output Real-time. I use many ways ,but not work rightly. system() and shellexcute can work rightly,but do not meet my requirements.They will have black Console.Now,who can solve the question or find another way that meet my requirements.Thank you!
yes,i start with cmd /c xxx.bat.The code is mainly :
createprocess("C:\\windows\\system32\\cmd.exe"," /C xxx.bat",.....true,...,"workdirectory"........);I don't know where problem is.
The batch file is :
echo off
find
..........
You can try it .you will find it not work really.
i only can say so much,because i can not get code ,it is at company.Thank you