-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathwindows.bat
More file actions
32 lines (28 loc) · 740 Bytes
/
Copy pathwindows.bat
File metadata and controls
32 lines (28 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
@echo off
NET SESSION >nul 2>&1
IF %ERRORLEVEL% NEQ 0 (
echo This setup needs admin permissions. Please run this file as admin.
pause
exit
)
set NULL_VAL=null
set NODE_VER=%NULL_VAL%
node -v >.tmp_nodever
set /p NODE_VER=<.tmp_nodever
del .tmp_nodever
IF "%NODE_VER%"=="%NULL_VAL%" (
echo.
echo Node.js is not installed! Please press a key to download and install it from the website that will open.
PAUSE
start "" https://nodejs.org/dist/v16.10.0/node-v16.10.0-x86.msi
echo.
echo.
echo After you have installed Node.js, press a key to shut down this process. Please restart it again afterwards.
PAUSE
EXIT
) ELSE (
echo A version of Node.js ^(%NODE_VER%^) is installed. Proceeding...
)
call npm i
call node index.js
pause