1The ERRORLEVEL environment variable holds the latest return value:
2IF %ERRORLEVEL% NEQ 0 (
3 echo "Previous command execution failed."
4 exit %ERRORLEVEL%
5)
1//Save it as start_dev.bat
2
3@ECHO off
4cd "C:\xampp"
5start xampp-control.exe
6
7cd "C:\Users\..."
8start cmd /k "code . && ng s -o"
9
10cd "C:\Users\..."
11start cmd /k "code-insiders . && php artisan serve"
1@ECHO OFF
2ECHO Congratulations! Your first batch file executed successfully.
3PAUSE
4