DOS window stays open when executing from a batch file

Discussion in 'C++' started by Alan, Jun 23, 2005.

  1. Alan

    Alan Guest

    When I run an executable directly (there's no console output), an
    MS-DOS windows opens briefly, then closes. When I call my executable
    from a batch file, the window stays open and says "finished." I have to
    close it manually.

    Any idea on why this might be the case? Thanks, Alan
     
    Alan, Jun 23, 2005
    #1
    1. Advertisements

  2. Alan wrote:
    > When I run an executable directly (there's no console output), an
    > MS-DOS windows opens briefly, then closes. When I call my executable
    > from a batch file, the window stays open and says "finished." I have to
    > close it manually.
    >
    > Any idea on why this might be the case? Thanks, Alan


    Pardon me, what's your C++ language question?
     
    Victor Bazarov, Jun 23, 2005
    #2
    1. Advertisements

  3. Alan

    Alan Guest

    It's an executable from a C++ program. Pardon me if this is
    not appropriate for this forum. I am glad you are policing it. I
    suppose next I will be thrown to the ground and handcuffed.
     
    Alan, Jun 23, 2005
    #3
  4. Alan wrote:
    > It's an executable from a C++ program. Pardon me if this is
    > not appropriate for this forum. I am glad you are policing it. I
    > suppose next I will be thrown to the ground and handcuffed.
    >


    If I (and some others) weren't "policing" this forum, how the fcuk would
    _you_ know that it's not appropriate? You apparently haven't read the
    FAQ or the Welcome message or this newsgroup at all to understand what
    is and what isn't appropriate...
     
    Victor Bazarov, Jun 23, 2005
    #4
  5. Alan

    Alan Guest

    Read this FAQ. I was asking the question to determine whether
    or not there was something I could do in my C++ PROGRAM (sound
    familiar?) to avoid this problem I had never encountered before with a
    C++ PROGRAM. If not, then that answers my question. Thus, I think I
    should be allowed, oh great one, to ask the question here.

    If you`re so interested in me not wasting your time, why don`t
    you skip this thread and let someone else answer.
     
    Alan, Jun 23, 2005
    #5
  6. Alan wrote:
    > Read this FAQ. I was asking the question to determine whether
    > or not there was something I could do in my C++ PROGRAM (sound
    > familiar?) to avoid this problem I had never encountered before with a
    > C++ PROGRAM. If not, then that answers my question. Thus, I think I
    > should be allowed, oh great one, to ask the question here.
    >
    > If you`re so interested in me not wasting your time, why don`t
    > you skip this thread and let someone else answer.
    >


    Easy now...

    Many folks here use Operating Systems other than MS Windows.

    Your question is specific to the MS Windows link/loader and
    the folks in one of the MS VC newsgroups may be able to answer it.

    Regards,
    Larry
     
    Larry I Smith, Jun 24, 2005
    #6
  7. Alan

    Stephen Howe Guest

    > Read this FAQ. I was asking the question to determine whether
    > or not there was something I could do in my C++ PROGRAM (sound
    > familiar?) to avoid this problem I had never encountered before with a
    > C++ PROGRAM. If not, then that answers my question. Thus, I think I
    > should be allowed, oh great one, to ask the question here.
    >
    > If you`re so interested in me not wasting your time, why don`t
    > you skip this thread and let someone else answer.


    Sure. It is an OS problem, you can do somthing about, but since OS-specific
    problems are not covered here, only C++, I will refrain from answering. Now
    you know it is not C++.

    SH
     
    Stephen Howe, Jun 24, 2005
    #7
  8. Alan

    Alan Guest

    Thanks, Stephan. The best way in the future to refrain is to not click
    on the "Reply" button.
     
    Alan, Jun 24, 2005
    #8
  9. Alan

    rossum Guest

    On 23 Jun 2005 15:53:00 -0700, "Alan" <> wrote:

    [snip]
    >I was asking the question to determine whether
    >or not there was something I could do in my C++ PROGRAM (sound
    >familiar?) to avoid this problem

    [snip]

    There is nothing you can do in the C++ program, you will have to make
    a change to the batch file. You might find the "EXIT" command useful
    in this context.

    rossum


    The ultimate truth is that there is no ultimate truth
     
    rossum, Jun 24, 2005
    #9
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Kraft

    running dos batch file

    John Kraft, Feb 3, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    735
    Brian W
    Feb 3, 2004
  2. DB
    Replies:
    2
    Views:
    1,529
    Eliyahu Goldin
    Jun 22, 2005
  3. Replies:
    2
    Views:
    530
    Toby A Inkster
    Jan 16, 2004
  4. Ben Fairbank
    Replies:
    2
    Views:
    5,748
  5. n o s p a m p l e a s e

    Calling a dos batch file from python

    n o s p a m p l e a s e, Sep 4, 2007, in forum: Python
    Replies:
    3
    Views:
    1,518
    Wesley Brooks
    Sep 5, 2007
  6. =?Utf-8?B?bWF0bHlu?=

    creating a file within a subdir in DOS batch file

    =?Utf-8?B?bWF0bHlu?=, Sep 20, 2007, in forum: ASP .Net
    Replies:
    0
    Views:
    766
    =?Utf-8?B?bWF0bHlu?=
    Sep 20, 2007
  7. Simon Wigzell
    Replies:
    4
    Views:
    433
    Simon Wigzell
    Sep 15, 2003
  8. king
    Replies:
    1
    Views:
    163
    Ben Morrow
    Jul 14, 2006
Loading...