Computing.Net > Forums > Disk Operating System > Running batch files and closing the dos box while they're running

Computing.Net: Over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to sign up now, it's free!

Running batch files and closing the dos box while they're running

Reply to Message Icon

Original Message
Name: Libby
Date: January 30, 2001 at 15:55:39 Pacific
Subject: Running batch files and closing the dos box while they're running
Comment:

Hi,
I've written a program to run some servers (in java) and a batch file to run this program. How do I get the batch file to start the java program, and then close the dos box, leaving the java program still running? thanks!


Report Offensive Message For Removal


Response Number 1
Name: Laurence
Date: January 31, 2001 at 09:44:42 Pacific
Reply: (edit)

If it can be assures that the ANSI.SYS driver is not loaded and/or that
the background color of the window is black, then just add these two
commands at the end of the procedure ...


cls
@exit

BTW, a colored background is considered non-blank (set via an ANSI
string). If the desire is to be iron clad, even when ANSI.SYS is
loaded, use ...

for %%v in ("prompt $e[m" "echo on" cls) do %%v
@exit


Regardless of the status of the display, checking the 'Close on exit'
selection on the Program tab of a shortcut to the batch procedure will
ALWAYS cause the window to close.


Batfiles: The DOS batch file programming handbook



Report Offensive Follow Up For Removal

Response Number 2
Name: Dana Hunter
Date: April 4, 2001 at 00:55:21 Pacific
Reply: (edit)

Seems it would be easier to make the Java program a desktop ICON. Or make the batch file a desktop ICON and select "PROGRAM" tab , "CLOSE ON EXIT".


Report Offensive Follow Up For Removal







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Disk Operating System Forum Home








Do you have a Desktop Computer anymore?

No
Yes, but only at work
Yes, but its rarely used
Yes, and its a workhorse


View Results

Poll Finishes Today.
Discuss in The Lounge
Poll History




Data Recovery Software