Cordova: Batch Script closes automatically
Question by Guest | 2017-09-05 at 11:33
For creating my apps for Android, iOS and Windows Mobile, I am using Cordova. To make my development process faster, I am about to build some Windows scripts that should do some common tasks for me.
Such a script can look like that, for example:
cordova create %DIR% %ID% %NAME% cd %DIR% cordova platform add android
This script should first create a new Cordova project and after the creation, the script should change into the project directory in order to add the platform "Android".
When typing those commands to the command line, everything is working like a charm. Strangely, it is not working as BAT-script. The script just breaks after the first "cordova create" command and even the CMD window closes immediately and automatically so that I cannot see whether there are any error messages. What can I do?
Related Topics
Windows Batch Script: Computer Shutdown
Tutorial | 2 Comments
Cordova only creates Debug APK (android-debug.apk)
Question | 1 Answer
Cordova Release APK not working
Question | 1 Answer
jQuery: Submit complete form and receive content with Ajax
Tutorial | 0 Comments
Put Windows via Script into Hibernation or Sleep Mode
Tutorial | 0 Comments
jQuery: Send HTML5 Canvas to Server via Ajax
Tutorial | 0 Comments
JavaScript: Show and hide HTML area by clicking a link
Tutorial | 0 Comments
Important Note
Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.
Participate
Ask your own question or write your own article on askingbox.com. That’s how it’s done.
You have to put "call" in front of the "cordova"-commands. When taking your script from above, it should look like that instead:
With calling the commands in this way, the script should not close automatically and it should process completely.
2017-09-05 at 14:34