Click to See Complete Forum and Search --> : disable "Press Any Key to Continue . . ."


evjo
February 4th, 2008, 08:10 PM
Hi All,

I have written a windows console app and we want to call it over and over again through scripts / batches etc, but the some how the application automatically produces a "Press Any Key to Continue . . ." at the end of its execution. I didn't add this in there, but I want to remove it, does anyone know how to do this?

thanks!

Arjay
February 4th, 2008, 08:13 PM
If you are running the console app (in Release mode) from within the IDE, this will appear.

Try running the application from a cmd window (outside the IDE). The 'Press any key...' should go away.

DeepT
February 5th, 2008, 08:07 AM
Yeah, the "Press any key..." is a courtesy of the development IDE, not an actual part of your program. If you actually look at Dev Studio executes your program, it creates a .bat file which it runs. In that bat file is a pause command.

Running your command directly will just cause the console to flash (pop up and go away instantly) if run via an icon, or just run normally from a console shell.