Take this i try it my self
(1) from inside your program make a batch file containing all
the DOS commands you want and name it "c:\c.bat"
use fopen,fwrite,fclose so simple.
(2) make a new Win32 program and call it "t.exe" and put this code on it.
#include <winbase.h>
#include <windows.h>
#include<stdlib.h>
int PASCAL WinMain(HINSTANCE hCurInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
{
SetWindowLong(/*your App handle*/, GWL_EXSTYLE, WS_EX_TOOLWINDOW);
system("c:\\c.bat");
return 0;
}
(3) Execute this program from inside your main program like this
WinExec("t.exe",SW_HIDDEN);
Gooooooooood bye