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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

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

Reply to Message Icon

Name: Libby
Date: January 30, 2001 at 15:55:39 Pacific
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!



Sponsored Link
Ads by Google

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

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



0

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

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".


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







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


Sponsored links

Ads by Google


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

batch file that will delete folders www.computing.net/answers/dos/batch-file-that-will-delete-folders/14500.html

Exit Dos after running batch file www.computing.net/answers/dos/exit-dos-after-running-batch-file/2473.html

Run Batch File Invisible/Stealth www.computing.net/answers/dos/run-batch-file-invisiblestealth/14270.html