Don't "autoclose" DOS window?

  • Thread starter Thread starter Bruce Bowler
  • Start date Start date
B

Bruce Bowler

On my old win98 machine I had done something so that when I double clicked
on a bat file in Windows Explorer, the job would run and the window would
stay there when the batch job finished.

On my new XPpro machine, running the same bat file, the window closes at
completion. I'd like to get the old behaviour back. I found _default.pif
and changed it by clearing the "close on exit" check box, but that didn't
help, the windows still close by themselves.

Any thoughts on how to fix this behaviour?

--
+-------------------+---------------------------------------------------+
Bruce Bowler | He who trusts everything to everybody we can trust
1.207.633.9600 | little. - Lessing
(e-mail address removed) |
+-------------------+---------------------------------------------------+
 
Dos doesn't run batch files in XP, cmd does. Put pause as the last line in your bat.
 
Set up a PIF to run you batch file. In the PIF's properties, Program tab,
uncheck "Close window on exit"

***************************

On my old win98 machine I had done something so that when I double clicked
on a bat file in Windows Explorer, the job would run and the window would
stay there when the batch job finished.

On my new XPpro machine, running the same bat file, the window closes at
completion. I'd like to get the old behaviour back. I found _default.pif
and changed it by clearing the "close on exit" check box, but that didn't
help, the windows still close by themselves.

Any thoughts on how to fix this behaviour?

--
 
Thanks, (and to David too, for his suggestion about adding a pause at
the end of each file). Neither of those are particularly desirable
solutions as I have a few hundred bat files.

It never ceases to amaze me when vendors take away useful features and
waste time on things like the flight simulator buried in excel.

Oh well, I guess I'm off to do some editting...

Set up a PIF to run you batch file. In the PIF's properties, Program tab,
uncheck "Close window on exit"

***************************

On my old win98 machine
I had done something so that when I double clicked on a bat file in
Windows Explorer, the job would run and the window would stay there when
the batch job finished.

On my new XPpro machine, running the same bat file, the window closes at
completion. I'd like to get the old behaviour back. I found _default.pif
and changed it by clearing the "close on exit" check box, but that didn't
help, the windows still close by themselves.

Any thoughts on how to fix this behaviour?

--
+-------------------+---------------------------------------------------+
Bruce Bowler | I'd rather have three husbands than one, I should
1.207.633.9600 | have married more. - Ingrid Bergman
(e-mail address removed) |
+-------------------+---------------------------------------------------+
 
Bat files are not dos bat files on XP. They are 32 bit console batch files.

command /k batname

Will run it as a Dos 5 commands. XP and Dos 5 commands are not the same. Anything you type in a XP command prompt OR a Dos command prompt goes to XP for execution. Only by starting command and passing the command on the command line can you force Dos 5 rules.

Type cmd in Start Run

Type dir /?

Type command in Start Run

Type dir /?

Type in Start Run

command /k dir /?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top