By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,836 Members | 2,028 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,836 IT Pros & Developers. It's quick & easy.

DOS window stays open when executing from a batch file

P: n/a
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

Jul 23 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
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?
Jul 23 '05 #2

P: n/a
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.

Jul 23 '05 #3

P: n/a
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...
Jul 23 '05 #4

P: n/a
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.

Jul 23 '05 #5

P: n/a
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
Jul 23 '05 #6

P: n/a
> 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

Jul 23 '05 #7

P: n/a
Thanks, Stephan. The best way in the future to refrain is to not click
on the "Reply" button.

Jul 23 '05 #8

P: n/a
On 23 Jun 2005 15:53:00 -0700, "Alan" <al********@3n.net> 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
Jul 23 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.