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

Start batch file as a background process from cmd

Status
Not open for further replies.

blakmk

Programmer
Feb 12, 2003
17
0
0
GB
Does anyone know a way to start a dos batch command in the background. This is similar to the unix technique of preceeding the command with a &

eg

c:> somebatchFile.bat > logfile.bat &
c:>
 
To change the performance of foreground and background programs

Open System in Control Panel.

On the Advanced tab, click Performance Options.
Under Application response, do one of the following:
Click Applications to assign more processor resources to the foreground program than the background program.
Click Background services to assign equal amounts of processor resources to all programs.

To open a Control Panel item, click Start, point to Settings, click Control Panel, and then double-click the appropriate icon.

Choosing the Applications option will result in a smoother, faster response time for your foreground program. If you want a background task, such as a Backup utility, to run faster, choose the Background services option.
The Applications option allocates short, variable time slices, or quanta, to running programs, while the Background services option assigns long, fixed quanta.
Related Topics
 
Thanks for replying, but you havn't specified exactly how to start the command in the background. I've tried using the & symbol but it doesnt seem to work on windows.

 
You have to set the process to background. My reply shows you how to do it..
 
I'm not familiar with the unix & so I'm not sure if this maps to what you need....

you could use the start command...although this launches a new environment it let's the original environment continue batch processing while the other one completes. You can run it minimised....

check help start for paramters.

JS
 
I think the answer is that any process that is not in the active window can be construed by Windows to be a background task. Windows does not have a way to initiate a process and return control to the command line before the process terminates the way Unix does. The Windows answer is to initiate a second command line in a separate window.

You can however alter the CPU priority that a process receives by using the task manager.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top