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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

All I want to do is submit a batch file as a process

Status
Not open for further replies.

ForumKid

MIS
Dec 21, 2001
122
US
I have a batch file. Its a java program that runs and then sleeps for a few hours and then re-executes. Problem is that I do not want the command window to stay open. I have been searching for hours now and cannot figure it out. I have tried cmd/c, start, etc. I dont think its a hard concept, Im jsut lost. Can someone tell me now to execute mybatch file and have it submit as a process and then i should be able to see task manager as a process.

Thanks in advance.
 
Hey Guys,

Well this forum seems pretty active. I take it there really isnt an easy way to do it.

Thanks for the help anyhow.
 
You could create a Windows service that runs the batch file.

-------------------------------

If it doesn't leak oil it must be empty!!
 
ForumKid,

Try this. Copy the code below and save it as "Loader.js" (whatever you like :) )

var WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run("MyBatch.bat", 0, false)

Replace "MyBatch.bat" with your batch file.
The code will run batch file without opening the command window. But remember that your batch file must close itself, otherwise you have to terminate from Task-Manager

Hope it works
Regards

-- AirCon --
 
I run a number of batch files through Task Scheduler as command prompt jobs which don't appear on the desktop and show as a CMD.EXE process in task manager. It does not need to be scheduled for a time/day, when you want it just open Task scheduler and select run.

If the batch files creates any sub-processes these will also be displayed but will be orphaned if you close the CMD.EXE process

Later
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top