back soft

مطالب مرتبط با «batch file for loop» در back soft | نویسنده: استخدام کار

Batch file - check if package exists - if not install it

Vote count: 0 I'm trying to do simple batch script (cmd) that will check if required packages are installed, if not it will install them and then will call my command. I've managed to check if node is installed using: node -v >nul 2>nul if %errorlevel%==9009 ( echo Install node.js and restart this script goto :EOF ) now I'm trying to check if specific npm package exists. I'm able to display error when package is not installed using: npm list bootprint --depth=0 >nul 2>nul || echo bootprint not found! but every line after after that isn't evaluated. Below is my full code: @echo off setlocal EnableDelayedExpansion ::check if node.js is installed node -v >nul 2>nul if %errorlevel%==9009 ( echo...

ادامه مطلب

برچسب‌های مرتبط

batch file commands | batch file | batch file comment | batch file programming | batch file variables | batch file if | batch file rename | batch file examples | batch file for loop | batch file pause