-
Notifications
You must be signed in to change notification settings - Fork 12
/
install_script.cmd
35 lines (35 loc) · 1.44 KB
/
install_script.cmd
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
33
34
35
echo off
echo Installation began: > install.log
date /t >> install.log
echo %TIME% >> install.log
where npm >> install.log
where node >> install.log
if %ERRORLEVEL% == 0 (
echo #### node -v #### >> install.log
node -v >> install.log
echo #### npm -v #### >> install.log
npm -v >> install.log
echo #### npm install #### >> install.log
npm install >> install.log
if %ERRORLEVEL% == 0 (
echo #### npm list #### >> install.log
npm list >> install.log
if exist "C:\Program Files\MongoDB 2.6 Standard\bin" (
echo Install complete! To start a database, double-click on `launch_database.cmd` or enter the following in the command line: "C:\Program Files\MongoDB 2.6 Standard\bin\mongod" --dbpath mongodatabase
pause
) else (
echo ERROR: "C:\Program Files\MongoDB 2.6 Standard\bin\mongod" does not exist. >> install.log
echo ERROR: "C:\Program Files\MongoDB 2.6 Standard\bin\mongod" does not exist.
echo Make sure to install mongodb. If it is already installed at different location
echo please edit the path in this script.
pause
)
) else (
echo ERROR: npm install failed!
pause
)
) else (
echo ERROR: npm and/or node is not in path! Make sure to install node and select the npm option. >> install.log
echo ERROR: npm and/or node is not in path! Make sure to install node and select the npm option.
pause
)