T
TheRain
Hey there,
I am writing some test code, trying to hook standard IO from cmd.exe.
What I really want to do is to open cmd.exe, keep it open, and have it
process the DOS commands as I sent them from my program. The problem
I'm having is that my program seems to be opening cmd.exe, but it
dissapears rather quickly. The code that I've commented out here is
code I want to use eventually in order to have the cmd window not
visible. Anyone have some idea as to why the window keeps
dissapearing?? thanks a bunch for any help..
<code>
ProcessStartInfo* startInfo = new ProcessStartInfo("cmd");
//startInfo->CreateNoWindow;
//startInfo->WindowStyle=ProcessWindowStyle::Hidden;
startInfo->UseShellExecute=false;
startInfo->RedirectStandardInput=true;
startInfo->RedirectStandardOutput=true;
startInfo->RedirectStandardError=true;
commandProc->Start(startInfo);
</code>
I am writing some test code, trying to hook standard IO from cmd.exe.
What I really want to do is to open cmd.exe, keep it open, and have it
process the DOS commands as I sent them from my program. The problem
I'm having is that my program seems to be opening cmd.exe, but it
dissapears rather quickly. The code that I've commented out here is
code I want to use eventually in order to have the cmd window not
visible. Anyone have some idea as to why the window keeps
dissapearing?? thanks a bunch for any help..
<code>
ProcessStartInfo* startInfo = new ProcessStartInfo("cmd");
//startInfo->CreateNoWindow;
//startInfo->WindowStyle=ProcessWindowStyle::Hidden;
startInfo->UseShellExecute=false;
startInfo->RedirectStandardInput=true;
startInfo->RedirectStandardOutput=true;
startInfo->RedirectStandardError=true;
commandProc->Start(startInfo);
</code>