Question:
Disappearing windows problem when running terminal (cmd) based programs on Windows 7 64 bit?
Kykliky
2011-03-06 21:03:50 UTC
I have compiled a program of mine using command prompt (cmd) in Windows without issue but when I try to run it and many other command based programs, such as terminal based compilers and other essential tools, the window for cmd will open for a fraction of a second and then close, although I can very briefly read text on the screen before it does. I run gcc and have used both minGW and Cygwin. The path variables I have added correctly and cygwin1.dll is added to my system files. I usually work using linux but am restricted to Windows 7 64 bit for the time being. :( I appreciate much anyone who can help...
Four answers:
anonymous
2011-03-06 21:08:23 UTC
It appears that your Windows 7 has been infected by an virus use any of the updated antivirus and scan your computer.
anonymous
2011-03-07 03:41:07 UTC
Commands in windows 7..



1st: Always run as admin :P



2nd: Insert This at the End... Pause .. Or ... Pause >nul



Pause - Will show.. Press any key to continue.

Pause >nul will Wait silently till you press any Key.



3rd: You Could Make the Cmd Wait... ping -n 10 127.0.0.1>nul



The 10 in the command above is the time to wait.



>nul hides the command From User.



Hope that helps :)
amy
2016-10-18 13:08:57 UTC
Mines a duel yet I might desire to have a 32 bit. it is all looking on your laptop, it is memory etc. Your safest wager is staring at expert web content that are experts in this container. Your laptop once you first start to indtall domicile windows 7 assist you to appreciate which bit to get no remember if the 32 or sixty 4. yet your safest wager is to decide for the 32 bit. yet like I say it relies upon on what your laptop says it may cope with :)
† Oh yeah
2011-03-07 00:54:32 UTC
Either add a system pause to your programs so you can interact with them or use an IDE like Code::Blocks which will keep the command prompt open until you press enter.



http://www.codeblocks.org/



*****************



I'm assuming you're running simple compiled c++ programs, otherwise ignore what I said above.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...