I want to run some command in the batch file and use the if statement.
@echo off
call npm install
echo node js instaled
if not errorlevel 1 (
call composer install
if not errorlevel 1 (
echo commands run success.
) else (
echo please install composer and then run this batch again.
)
) else (
echo you have not nodejs in your system. please install nodejs.
)
when I run this batch file after npm install completed say
node js installed
if was unexpected at this time.
how I can check success and unsuccess of the command and then run other commands.