How to run batch files in the backround ?

please anyone tell me how to run the batch files in the background i dont want anyone to interfere the batch file..The batch file has to run for a long time even days so it will be safe if the batch file is running in the bachgroung somewhere ..

please help me in this regards

Thanking u

Regards

Santhosh

[338 byte] By [santhoshvga] at [2007-11-27 9:29:03]
# 1
you want to run the batch file with java ?
Aniruddha-Herea at 2007-7-12 22:36:14 > top of Java-index,Desktop,Deploying...
# 2
Hi all,I want to run batch files in java ...but the thing is it is visible to the user and the user can close the dos prompt so in order to avoid that i want the batch file to run in the background ....please help me ...regards Santhosh
santhoshvga at 2007-7-12 22:36:14 > top of Java-index,Desktop,Deploying...
# 3

The easiest way is to write a native application which starts the batch file in hidden mode (the target batch file could be an argument).

Under Windows it would be done with the API call

ShellExecute(NULL, "open", "C:\mybatch.bat", NULL, NULL, SW_HIDE);

Then compile the native tool as windows application with no user interface. Now you are able to execute applications in invisible mode.

alexra at 2007-7-12 22:36:14 > top of Java-index,Desktop,Deploying...