Reputation: 20224
I made some batch files for builds etc, and some stay open until I press a key, some don't. Since the batch files are started on doubleclick from explorer, the last command always is pause.
This works:
@echo off
sencha app build testing
pause
This does not work:
@echo off
cscript /nologo newKey.vbs
sencha app build production
copy build\production\MyApp\app.js phonegap\www\
cd phonegap
cordova build android wp8
pause
Why does pause not wait for my keystroke here? Does it get any "keystroke" from the command before?
I am using Windows 8.1, if that matters...
Upvotes: 0
Views: 502
Reputation: 70923
Because cordova
is cordova.cmd
, a batch file, and when a batch file invokes another batch file the execution flow is transferd to the called batch but does not return to the caller
You will need to use the call
command, so the execution flow returns to the caller
call cordova build android wp8
Upvotes: 2