Create a new cmd.exe window from within another cmd.exe prompt

Viewed 208478

I am in the process of setting up CruiseControl.NET. The problem I am having is that I am running CC as a console application and when my build completes successfully and executes (using exec) it launches it within the CruiseControl DOS prompt. I am just using simple batch files to launch my app but having it run within the same prompt as CC is causing CC to think the build continues as long as my app runs.

Are there command line parameters to cmd.exe that will spawn another separate prompt window?

11 Answers

I think this works:

start cmd.exe

Here is the code you need:

start cmd.exe @cmd /k "Command"
start cmd.exe 

opens a separate window

start file.cmd 

opens the batch file and executes it in another command prompt

You can just type these 3 commands from command prompt:

  1. start

  2. start cmd

  3. start cmd.exe

If we simply use start command or start cmd.exe it opens cmd.

If you want to open the same command prompt window;

start "Command Prompt"

launch_stack.bat will open 2 windows to run your alices.bat and bobs.bat

start alices.bat
start bobs.bat

You can write in command line this command

cmd

Previous command will open in current command line with new session

OR

start

Related