本帖最后由 idwma 于 2021-10-28 21:55 编辑
- @echo off
- color 1f
- call git --version 2>nul
- if %errorlevel% == 0 (
- echo.
- echo GIT 已安装
- echo ______________________________
- ) else (
- echo.
- echo GIT 未安装, 开始安装
- echo ______________________________
-
- start /w Git-2.33.0.2-64-bit.exe /VERYSILENT
- cls
- echo.
- echo GIT 已安装
- echo ______________________________
- )
- call npm --version 2>nul
- if %errorlevel% == 0 (
- echo.
- echo NPM 已安装, 继续执行
- echo ______________________________
- ) else (
- echo.
- echo NPM 未安装, 开始安装
- echo ______________________________
-
- start /w node-v13.14.0-x64.msi /passive /qr
- cls
- echo.
- echo NPM 已安装, 按任意键退出后, 重新打开
- echo ______________________________
- for /f "tokens=2*" %%i in ('reg query "hklm\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v path') do set p=%%j
- for /f "tokens=2*" %%i in ('reg query "hkcu\environment" /v path') do set pp=%%j
- call;set path=%%p%%;%%pp%%
- )
-
- call yarn --version 2>nul
- if %errorlevel% == 0 (
- echo.
- echo Yarn 已安装
- echo _________________________________________________________
- ) else (
- echo.
- echo Yarn 未安装, 开始安装
- echo _________________________________________________________
- call npm install -g yarn --registry=https://registry.npm.taobao.org
-
- )
- pause
复制代码
|