Command Prompt Won't Remain Open When Running C/C++ Scripts

Status
Not open for further replies.

Jasio-

Posts: 68   +0
Just wondering how to fix this, whenever I run a C/C++ script, the command prompt window will close as soon as the task is complete. I would prefer it remain open to read the status, or run other tasks on it.

Thanks,
Ross
 
Putting a pause at the end should keep it open - but not allow you to use the command window after that.
 
Is there any way to keep it from automatically closing?.. something preferably that isn't required in the script itself.
 
What if you open a command prompt first, then execute the script from within the prompt. I don't know the context in which you are running, but for example typing ipconfig from the Start -> Run leaves the window open in 9x, but in 2k and beyond it doesn't, so you have to launch the command prompt first, then enter ipconfig.
 
Jasio- said:
Just wondering how to fix this, whenever I run a C/C++ script, the command prompt window will close as soon as the task is complete. I would prefer it remain open to read the status, or run other tasks on it.

Thanks,
Ross

put a wait trigger in the script so it doesn't close out on you..
 
SNGX1275 said:
Start -> Run leaves the window open in 9x, but in 2k and beyond it doesn't, so you have to launch the command prompt first, then enter ipconfig.
try run->cmd /k $any-command
the window is retained AFTER the completion of $any-command
ie: /k == KEEP :)
 
Status
Not open for further replies.
Back