Re: Batch File Problem - Batch File Enclosed
- From: "Pegasus \(MVP\)" <I.can@xxxxxxx>
- Date: Wed, 31 Oct 2007 18:08:47 +0100
"Tony P." <noone@xxxxxxxxxxxxxxxxx> wrote in message
news:ueaHJ49GIHA.484@xxxxxxxxxxxxxxxxxxxxxxx
Pegasus (MVP) wrote:
"Tony P." <noone@xxxxxxxxxxxxxxxxx> wrote in message
news:Osr25e6GIHA.4592@xxxxxxxxxxxxxxxxxxxxxxx
Hello,
I have added a batch file to my Startup folder to execute whenever
Windows boots. The batch file works ok but it leaves a blank command
(DOS)window on the screen. The only thing in the command window is a
flashing cursor. I would like close this window using the batch file
after the file executes. I have tried adding an exit command to the
batch file but it doesn't seem to work. When the command window
appears on the scrren, the only way to remove it is to click the X
in the upper right corner. I can't enter any commands in the command
window. Is there a way to close the command window in the batch file?
--
Thanks,
Tony
For replies, please correct my email address.
Let's have a look at your batch file.
This is the batch file in question. The last line of the file has the exit
command but the window stays open.
@echo off
:again
ping www.google.com |find/i"bytes=" > nul && goto Connected
ping localhost -n 60 > nul
goto again
:Connected
"c:\Program Files\Mailwasher\mailwasher.exe"
exit
Your problem is not the batch file or the process in which it runs
but mailwasher.exe itself: It fails to return control to the batch
file until you close it manually. You can easily test this yourself!
To get around the problem, use this code:
:Connected
start "Mail Washer" "c:\Program Files\Mailwasher\mailwasher.exe"
There is no need for the "exit" command - the command
window will close automatically after executing the last
line.
.
- Follow-Ups:
- Re: Batch File Problem - Batch File Enclosed
- From: \RemS
- Re: Batch File Problem - Batch File Enclosed
- References:
- Batch File Problem
- From: Tony P.
- Re: Batch File Problem
- From: Pegasus \(MVP\)
- Re: Batch File Problem - Batch File Enclosed
- From: Tony P.
- Batch File Problem
- Prev by Date: Re: reboot after mup.sys
- Next by Date: Re: Windows cannot enter into standby
- Previous by thread: Re: Batch File Problem - Batch File Enclosed
- Next by thread: Re: Batch File Problem - Batch File Enclosed
- Index(es):
Relevant Pages
|
|