Clint asked in this group how to make sure that the window belonging to a batch file would automatically close once the batch file had done its job.
My last post made some suggestions on this, based on what works with Windows 98 SE. Since then I've managed to spend a little time with Windows XP computers (Win XP home ver SP1) and now recall that the situation is different. If you generate a batch file in Windows XP, right click its icon, select Properties, there is no "Program" tab and no option to select "Close on Exit". The reason for this appears to be that there's no need for it - such a file will automatically close on exit as soon as the batch file has passed its last command. At least, this is what I found on experimenting, and remembered I had been in this situation before some months ago and found that the only way to keep such a window open was by including a Pause command (required a key press before continuing). So, I'm puzzled by Clint's problem. A (Windows XP) batch file window apparently closes on its own, without the need for an exit command in the script. On opening the cmd window (Start > Run > cmd) and typing exit /? one can gain a bit of information from the system about the exit command. What may be of interest is:- ------------------------------------ exit [/B] Specifies to exit the current batch script instead of cmd.exe If executed from outside a batch script it will quit cmd.exe ----------------------------------- So Clint, it looks as though a line in the batch file of exit /B should force the batch file window to close with no ambiguity about what the exit refers to. If the application you are invoking from the batch file is an MS DOS based program, then I guess you should be able to use the technique mentioned in my previous post to ensure that its operating window also closes automatically when it is finished. Hope this is of some help, and my apologies if I haven't understood precisely what the problem is. Cheers, John Selby. ============= PCWorks Mailing List ================= Don't see your post? Check our posting guidelines & make sure you've followed proper posting procedures, http://pcworkers.com/rules.htm Contact list owner <[EMAIL PROTECTED]> Unsubscribing and other changes: http://pcworkers.com =====================================================
