I am using rake to build my project and I have a build.bat file similar to this:
@echo off cls rake
When I double click on build.bat the dos window pops up and shows all the progress but closes itself when the task is finished. Is there way to do a Console.ReadLine so that user can get a chance to see the log?
Thanks.
Updated:
I've tried below but didn't work. not sure why.
@echo off cls rake pause
Using EXIT /B will stop execution of a batch file or subroutine and return control to the command processor or to the calling batch file or code immediately. EXIT /B is available in Windows 2000 and later versions' CMD.
The example below will open a browser window and press the Tab key to move on the input field. The code for our example will look like the below. In the above example, through the line SET SendKeys=CScript //nologo //E:JScript "%~F0" , we send keys to the keyboard buffer by using %SendKeys% .
bat "progfortr" "{ENTER}" call sendkeys. bat progfortr.exe "{ENTER}" call sendkeys.
To create a blank line in a batch file, add an open bracket or period immediately after the echo command with no space, as shown below. Adding @echo off at the beginning of the batch file turns off the echo and does not show each of the commands. @echo off echo There will be a blank line below.
Default interpreters from Microsoft are done in a way, that causes them exit when they reach EOF. If rake is another batch file, command interpreter switches to it and exits when rake interpretation is finished. To prevent this write:
@echo off cls call rake pause
IMHO, call operator will lauch another instance of intepretator thereby preventing the current one interpreter from switching to another input file.
pause
will display:
Press any key to continue . . .
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With