# [off topic] Closing Dos Batch File Windows
**Category:** [Yahoo Archive](https://www.epiusers.help/c/yahoo-archive/9)
**Created:** 2001-03-12 10:57 UTC
**Views:** 648
**Replies:** 5
**URL:** https://www.epiusers.help/t/off-topic-closing-dos-batch-file-windows/2419
---
## Post #1 by @system
Troy, Try entering a line with the word "exit" in it. That should close out
the window..
Lyal Shoff
Processor/MIS
Hanard Machine Inc.
859 7th St. NW.
Salem, Oregon 97304
Phone: 503-364-3952
Fax: 503-364-6895
[Non-text portions of this message have been removed]
---
## Post #2 by @system
Does anyone know how to make a DOS batch file that automatically closes the DOS window after it is done? Is there a DOS command to do this?
Troy Funte
Liberty Electronics
[Non-text portions of this message have been removed]
---
## Post #3 by @system
On Windows 95 and 98 machines. When you first run a DOS application on that
computer it creates a PIF file (in your Windows\PIF directory). If you open
the PIF file properties, there is a check box for "close on exit". I don't
know the reason but the default is unchecked, thus leaving the DOS window
open. Check it and the window will close when the DOS app ends.
Michael Podlin
-----Original Message-----
From: Troy Funte [mailto:
tfunte@...]
Sent: Sunday, March 11, 2001 6:48 PM
To: Vantage
Subject: [Vantage] [off topic] Closing Dos Batch File Windows
Does anyone know how to make a DOS batch file that automatically closes the
DOS window after it is done? Is there a DOS command to do this?
Troy Funte
Liberty Electronics
[Non-text portions of this message have been removed]
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/
---
## Post #4 by @system
> Does anyone know how to make a DOS batch file that
> automatically closes the DOS window after it is done? Is
> there a DOS command to do this?
"exit"
Is this a batch file? I have found if a launch a CMD or BAT file, they close
when they are done even if I don't put in an EXIT command. If it is a batch
file, check to make sure the last command is actually finishing by putting a
PAUSE command after the last line. If the batch file stops to wait for a key
press, then at least you know the previous command is finishing.
Brian Boyes,
Systems Administrator,
Precision Resource Canada Ltd.
<
http://www.precisionresource.com>
<mailto:
brianb@...>
---
## Post #5 by @system
Try putting EXIT as the last line of the batch file (or the last line to be
executed)
Jim S.
-----Original Message-----
From: Troy Funte [mailto:
tfunte@...]
Sent: Sunday, March 11, 2001 7:48 PM
To: Vantage
Subject: [Vantage] [off topic] Closing Dos Batch File Windows
Does anyone know how to make a DOS batch file that automatically closes
the DOS window after it is done? Is there a DOS command to do this?
Troy Funte
Liberty Electronics
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
---
## Post #6 by @system
Exit didn't close the window on the batch file until I selected Properties on the DOS box and checked "Close on Exit". Now it closes fine.
Thanks for the help Mike, Brian, and Jim
Troy Funte
Liberty Electronics
----- Original Message -----
From: Troy Funte
To: Vantage
Sent: Sunday, March 11, 2001 7:48 PM
Subject: [Vantage] [off topic] Closing Dos Batch File Windows
Does anyone know how to make a DOS batch file that automatically closes the DOS window after it is done? Is there a DOS command to do this?
Troy Funte
Liberty Electronics
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
Click Here to Find Software Faster
Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
[Non-text portions of this message have been removed]
---
**Canonical:** https://www.epiusers.help/t/off-topic-closing-dos-batch-file-windows/2419
**Original content:** https://www.epiusers.help/t/off-topic-closing-dos-batch-file-windows/2419