Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

batch files won't close in WIN98 2

Status
Not open for further replies.

biot023

Programmer
Nov 8, 2001
403
GB
Hallo again.
I have a program that creates & runs a number of batch files invisibly with ShellExecute.
My problem is, it keeps crashing in Windows 98 (it's fine in NT), as the batch files won't close.
There is a setting you can apply to individual batch files that makes them close on completion, but this is no good in this case.
Does anyone know how to make a batch file self-closing, or of a setting in 98SE that allows all batch files to close?

Help very much needed!

Cheers,
Douglas JL

Common sense is what tells you the world is flat.
 
Hello :)

Edit the batch file, add 2 extra lines at the end

So this will run the MS Calculator and then exit

Calc.exe
echo off
cls
 
send me an example batch file and Ill see what I can do.

I didnt know that there was any body still running
batch files. I use them so much that I made a batch
file editor for windows. I have never had a problem
with a batch file closing. just the oposite. I have to
add pause to veiw the results if the batch file processes
to quickly.

you might try the system function to call the
batch file.

system ("test.bat");
 
I was trying to find this thread the other day to update it.
I got an answer from a nice chap in the WIN98 forum that did the job - & that agrees with BTecho's answer.
If you set echo off & end with cls, the batch file closes nice as pie.
I'll have to try the system() function, too.
Cheers, everyone.

Douglas JL

Common sense is what tells you the world is flat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top