Thursday, May 3, 2012

Open process in new instance from batch file

Sometimes you need to open one or more executables or instances from a batch file. However, you would need to do this within a new process, as not to block the execution of the current batch file. The way to do this is by using the command Start.


Syntax

start ["title"] [/dPath] [/i] [/min] [/max] [{/separate | /shared}] [{/low | /normal | /high | /realtime | /abovenormal | belownormal}] [/wait] [/b] [FileName] [parameters]

Parameters

"title" : Specifies the title to display in Command Prompt window title bar.
/dPath : Specifies the startup directory.
/i : Passes the Cmd.exe startup environment to the new Command Prompt window.
/min : Starts a new minimized Command Prompt window.
/max : Starts a new maximized Command Prompt window.
/separate : Starts 16-bit programs in a separate memory space.
/shared : Starts 16-bit programs in a shared memory space.
/low : Starts an application in the idle priority class.
/normal : Starts an application in the normal priority class.
/high : Starts an application in the high priority class.
/realtime : Starts an application in the realtime priority class.
/abovenormal : Starts an application in the abovenormal priority class.
/belownormal : Starts an application in the belownormal priority class.
/wait : Starts an application and waits for it to end.
/b : Starts an application without opening a new Command Prompt window. CTRL+C handling is ignored unless the application enables CTRL+C processing. Use CTRL+BREAK to interrupt the application.
FileName : Specifies the command or program to start.
parameters : Specifies parameters to pass to the command or program.

No comments: