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

后端 未结 8 1174
萌比男神i
萌比男神i 2020-11-30 23:35

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 ex

相关标签:
8条回答
  • 2020-11-30 23:41

    Simply type start in the command prompt:

    start
    

    This will open up new cmd windows.

    0 讨论(0)
  • 2020-11-30 23:43
    START "notepad.exe"
    echo Will launch the notepad.exe application
    PAUSE
    

    To make any cmd file type, all you have to do is save the contents as .bat, i.e.

    @echo
    TITLE example.bat
    PAUSE
    taskkill/IM cmd.exe
    

    Make that into an "example.bat" file, save it, then open it and run.

    0 讨论(0)
  • 2020-11-30 23:46

    I think this works:

    start cmd.exe
    
    0 讨论(0)
  • 2020-11-30 23:59

    I also tried executing batch file that run daemon process/server at the end of CCNET task; The only way to make CruiseControl spawn an independent asynchronous process WITHOUT waiting for the end of process is:

    1. create a batch file to run the daemon process (server application)
    2. use task scheduler to run the batch file as CCNET task (using schtasks.exe)

      schtasks.exe /create /F /SC once /ST 08:50 /TN TaskName /TR "c:/path/to/batchFileName.bat"
      
      • 08:50 is the HH:MM time format

    you might need to kill the process at the start of ccnet

    PS: the selected answer using "start cmd.exe" does not work; a new command prompt is indeed spawned, but CCNET will wait for the spawned cmd to finish.

    0 讨论(0)
  • 2020-12-01 00:00

    simple write in your bat file

    @cmd
    

    or

    @cmd /k "command1&command2"
    
    0 讨论(0)
  • 2020-12-01 00:02
    start cmd.exe 
    

    opens a separate window

    start file.cmd 
    

    opens the batch file and executes it in another command prompt

    0 讨论(0)
提交回复
热议问题