1
1
@ echo off
2
2
3
3
setlocal
4
+ title Install Additional Tools for Node.js
4
5
5
6
cls
7
+
6
8
echo ====================================================
7
9
echo Tools for Node.js Native Modules Installation Script
8
10
echo ====================================================
9
11
echo .
10
- echo This Boxstarter script will install Python and the Visual Studio Build Tools,
11
- echo necessary to compile Node.js native modules. Note that Boxstarter,
12
- echo Chocolatey and required Windows updates will also be installed.
12
+ echo This script will install Python and the Visual Studio Build Tools, necessary
13
+ echo to compile Node.js native modules. Note that Chocolatey and required Windows
14
+ echo updates will also be installed.
13
15
echo .
14
16
echo This will require about 3 Gb of free disk space, plus any space necessary to
15
- echo install Windows updates.
16
- echo .
17
- echo This will take a while to run. Your computer may reboot during the
18
- echo installation, and will resume automatically.
17
+ echo install Windows updates. This will take a while to run.
19
18
echo .
20
- echo Please close all open programs for the duration of the installation.
19
+ echo Please close all open programs for the duration of the installation. If the
20
+ echo installation fails, please ensure Windows is fully updated, reboot your
21
+ echo computer and try to run this again. This script can be found in the
22
+ echo Start menu under Node.js.
21
23
echo .
22
- echo You can close this window to stop now. This script can be invoked from the
23
- echo Start menu. Detailed instructions to install these tools manually are
24
- echo available at https://github.com/nodejs/node-gyp#on-windows
24
+ echo You can close this window to stop now. Detailed instructions to install these
25
+ echo tools manually are available at https://github.com/nodejs/node-gyp#on-windows
25
26
echo .
26
27
pause
27
28
28
29
cls
30
+
29
31
REM Adapted from https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/79bbe5bdc4867088b3e074f9610932f8e4e192c2/README.md#legal
30
32
echo Using this script downloads third party software
31
33
echo ------------------------------------------------
@@ -36,49 +38,18 @@ echo result of a Chocolatey install. This acceptance occurs whether you know the
36
38
echo license terms or not. Read and understand the license terms of the packages
37
39
echo being installed and their dependencies prior to installation:
38
40
echo - https://chocolatey.org/packages/chocolatey
39
- echo - https://chocolatey.org/packages/boxstarter
40
41
echo - https://chocolatey.org/packages/python2
41
- echo - https://chocolatey.org/packages/visualstudio2017buildtools
42
42
echo - https://chocolatey.org/packages/visualstudio2017-workload-vctools
43
43
echo .
44
44
echo This script is provided AS-IS without any warranties of any kind
45
45
echo ----------------------------------------------------------------
46
46
echo Chocolatey has implemented security safeguards in their process to help
47
47
echo protect the community from malicious or pirated software, but any use of this
48
48
echo script is at your own risk. Please read the Chocolatey's legal terms of use
49
- echo and the Boxstarter project license as well as how the community repository
50
- echo for Chocolatey.org is maintained.
49
+ echo as well as how the community repository for Chocolatey.org is maintained.
51
50
echo .
52
51
pause
53
52
54
53
cls
55
- echo !!!!!WARNING! !!!!
56
- echo -----------------
57
- echo This script should make installing the tools as easy as possible. Hence, it
58
- echo WILL NOT OFFER ANY CUSTOMIZATION. If there's any parameter you'd like to
59
- echo customize (like installation directory or features), or if there's any
60
- echo special rule or policy that your computer should comply to (like not being
61
- echo able to log in as the user with administrative privileges), please follow the
62
- echo instructions to download and execute the installers directly:
63
- echo https://github.com/nodejs/node-gyp#on-windows
64
- echo .
65
- echo Use of Boxstarter may reboot your computer automatically multiple times.
66
- echo When performing a reboot, Boxstarter will need to disable User Account
67
- echo Control (UAC) to allow the script to run immediately after the reboot. When
68
- echo the scripts have completed, Boxstarter will re-enable UAC. If you prematurely
69
- echo stop the process, UAC will need to be re-enabled manually.
70
- echo .
71
- echo Sometimes the scripts may install all necessary Windows Updates which
72
- echo could cause a high number of reboots that appear to be a reboot loop when
73
- echo in fact it is just a normal Windows Updates reboot cycle.
74
- :acceptretry
75
- echo .
76
- echo Your computer may REBOOT SEVERAL TIMES WITHOUT FURTHER WARNING.
77
- echo Please type YES followed by enter to confirm that you have saved all your
78
- set /p " ACCEPT_PROMPT = work and closed all open programs: "
79
- if /i not " %ACCEPT_PROMPT% " == " yes" (
80
- echo Please type YES to confirm, or close the window to exit.
81
- goto acceptretry
82
- )
83
54
84
- " %SystemRoot% \System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot% \System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://boxstarter .org/bootstrapper .ps1'')); get-boxstarter -Force; Install-BoxstarterPackage -PackageName '' %~dp0 \install_tools.txt'' ; Read-Host ''Type ENTER to exit'' ' -Verb RunAs
55
+ " %SystemRoot% \System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command Start-Process '%SystemRoot% \System32\WindowsPowerShell\v1.0\powershell.exe' -ArgumentList '-NoProfile -InputFormat None -ExecutionPolicy Bypass -Command iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey .org/install .ps1'')); choco upgrade -y python2 visualstudio2017-workload-vctools ; Read-Host ''Type ENTER to exit'' ' -Verb RunAs
0 commit comments