CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2008
    Posts
    1

    disable "Press Any Key to Continue . . ."

    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!

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: disable "Press Any Key to Continue . . ."

    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.

  3. #3
    Join Date
    Sep 2004
    Posts
    1,361

    Re: disable "Press Any Key to Continue . . ."

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured