473,804 Members | 2,711 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DOS window stays open when executing from a batch file

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
8 2159
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
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
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
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
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
> 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
Thanks, Stephan. The best way in the future to refrain is to not click
on the "Reply" button.

Jul 23 '05 #8
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
16599
by: Roland | last post by:
Hello, the example code is the following(the number in parentheses at the beginning are just for reference)(The complete HTML file is at the end of this article): (1)window.location = 'http://www.google.com'; (2)alert("I'm still here!"); (3)window.open("http://www.slashdot.com", "_blank");
1
15198
by: Rob | last post by:
I'm running a batch file using the Shell function. When I manually launch the batch file, the window remains open, since I use the 'pause' statement. But when I launch the batch file within Access, the Shell window becomes a blip on the screen and then is gone. Why does the Shell window not stay open on the screen? I want to visually verify that the batch file is functioning properly and then close the window myself. Am I missing a...
4
47547
by: Bill | last post by:
I need help closing a CMD window when it is executed from Access. 1) The batch file is called from Access. 2) Access closes, 3) the batch runs a copy of the access database (creating a backup) 4) Once the copy is complete, the batch file opens the Access database again 5) EXIT should close out the cmd window but it does not execute that line
5
18600
by: thinktwice | last post by:
<package> <job id="js"> <script language="JScript"> var WshNetwork = WScript.CreateObject("WScript.Network"); var oDrives = WshNetwork.EnumNetworkDrives(); var oPrinters = WshNetwork.EnumPrinterConnections(); WScript.Echo("Domain = " + WshNetwork.UserDomain); WScript.Echo("Computer Name = " + WshNetwork.ComputerName); WScript.Echo("User Name = " + WshNetwork.UserName); WScript.Echo();
0
1476
by: Burt | last post by:
I have an ASP.NET page that performs a window.open to an HttpHandler that streams a binary file to the brower. I am forcing the save_as... dialog in IE. My issue is that in IE6 the new window opens and the download starts. When the download is cancelled or completed the window automatically closes, which is exactly what I want to happen. The issue is that in IE7 Beta 2 the window just stays open. I've tried using a simple aspx page...
7
14139
by: ajays | last post by:
I have a situation where i have to execute a Batch script on Remote Windows Machine (MACH2) from my local machine (MACH1). I was able to do this from windows machine to Linux machine but not able to do this from windows machine to windows machine. Because when i coonect to windows machine MACH1 to anothe windows machine MACH2 using telnet , it ask for a (y/n) from the user , which i'm not able to provide in script (written below ) ...
12
6547
by: Dilip | last post by:
Hi All I have a server based C# console application. This application must hide its console window when its launched out on the field. So I dutifully P/Invoke'd FindWindow/ShowWindow combination to hide the console window at launch time. The application (for legacy reasons) hangs around by waiting on an old- fashioned Console.ReadLine() statement.
3
10258
by: Andrew Poulos | last post by:
There's a HTA application that's running on a local computer (not from a URL) and the user can open a new HTML window by clicking a button The first time the user clicks the button the window opens. Any subsequent click causes this dialog, with this error, to appear: "Error: The remote server machine does not exist or is unavailable" The relevant code is
1
3454
by: SilverGS | last post by:
I want to automatically open a Command Window from the Startup folder in Windows XP. right now after XP starts, I click on Start run, cmd and then when the command window is open I type in a bunch of commands to start a program and I leave the command window open as the program I am running runs in the command window. How can I invoke the command window via a .bat file, and then run my commands automatically? I have the second part...
0
10561
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10318
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10069
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6845
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5505
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2976
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.