Getting Batch Files to Close Their Own Windows in 95

Kenn's
Tech
Notes

19980607: Getting Batch Files to Close Their Own Windows in 95

June/1998
Tech Note #7

Al F turned up this useful tidbit. If you ever have occasion to distribute disks which use batch files, you may have noticed that on some Windows 95 systems, the window in which the batch runs does not close itself. Instead, it stays open, with the window title changing to Finished - (name of batch). You can avoid this annoyance by distributing a PIF file with your batch, but there's an even easier way. Simply add these two statements to the very end of the batch:
echo off
cls

Even with a PIF that says not to close the window, the window of any batch ending with those two statements will close!

For more information see Microsoft's Technical Article Q122514.



DISCLAIMER: This document is intended for the reference of computer support personnel within Winnipeg School Division No. 1. There is no warranty or liability if procedures recommended here have an adverse affect on any systems. Use them at your own risk. Any trademarks mentioned are the property of their owners, none of whom have certified any information provided here. Opinions expressed here are personal only and do not represent the policy of Winnipeg School Division No. 1 or any other organization anywhere.


Got a Tech Note to share? Submissions are most welcome! [Click here.]

To return to the Tech Notes home page, click here.

To download a copy of all the June/1998 Tech Notes in Rich Text Format, click here.
Click here to visit the Information "Super-Cul-De-Sac". This page was updated
2001 June 9


This page hosted by
Get your own Free Homepage
Check out my neighbours here in Silicon Valley Peaks by clicking here.