Donate SIGN UP

XP exes close after running

Avatar Image
aceizace | 22:19 Sat 07th Aug 2004 | Technology
8 Answers
Hi there, i need to be quick so sorry this is brief. Basically when i run a program in windows xp like ipconfig it closes after running, before i can read it, any way to change this? Thanks
Gravatar

Answers

1 to 8 of 8rss feed

Best Answer

No best answer has yet been selected by aceizace. Once a best answer has been selected, it will be shown here.

For more on marking an answer as the "Best Answer", please visit our FAQ.
Certain utilities do not have an associated grpahical user interface (GUI) and should be run from the command window. So to use ipconfig, first click: Start - Run and type CMD and press enter(or COMMAND for earlier versions of Windows and then enter) In the window, type: IPCONFIG and press enter For more info, type: ipconfig /all and press enter Most command-line utilities will provide help if you type /? after. e.g: ipconfig /?
BTW - To close the command window, type EXIT and press enter
Question Author
Hi, sorry, i wasn't able to explain this before i left. OK, thanks for the info but i am aware of being able to use the command prompt for situations like ipconfig, however i'm trying to learn C++ and i want to test my exe files. I know that i can move the exe to my folder in 'documents and settings' and just type it in the command prompt then, but that requires a bit too much effort just for the test purposes of a message that says 'hello' in dos. So basically what i'm looking for is either a line for C++ that can make it not close when it finishes... or not close until a button is pressed... something like that, or a way to navigate around the command prompt, i can never seem to change the directory from c:/documents and settings/andrew. Hope that makes sense, thanks.
ahhh. c++ is for real propellorheads and I can't help you I'm afraid. Perhaps http://msdn.microsoft.com/ can help...
The same applies for a c++ application. If you've compiled a console app, run it in a shell (cmd.exe) the same as you would ipconfig. Or you could use : fgetc(stdin); in the program to read a character from standard input. You'll need #include in there somewhere too.
That should be : #include <stdio.h>
Question Author
Thanks OBonio, that works. I also found that putting cin.get(); at the end produces the same effect, but only needs the iostream.h libary.
That's probably better than using fgetc as it's more object oriented which is pretty much the whole point of the ++ part.

1 to 8 of 8rss feed

Do you know the answer?

XP exes close after running

Answer Question >>

Related Questions

Sorry, we can't find any related questions. Try using the search bar at the top of the page to search for some keywords, or choose a topic and submit your own question.