install_tools.bat 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. @echo off
  2. setlocal
  3. title Install Additional Tools for Node.js
  4. cls
  5. echo ====================================================
  6. echo Tools for Node.js Native Modules Installation Script
  7. echo ====================================================
  8. echo.
  9. echo This script will install Python and the Visual Studio Build Tools, necessary
  10. echo to compile Node.js native modules. Note that Chocolatey and required Windows
  11. echo updates will also be installed.
  12. echo.
  13. echo This will require about 3 GiB of free disk space, plus any space necessary to
  14. echo install Windows updates. This will take a while to run.
  15. echo.
  16. echo Please close all open programs for the duration of the installation. If the
  17. echo installation fails, please ensure Windows is fully updated, reboot your
  18. echo computer and try to run this again. This script can be found in the
  19. echo Start menu under Node.js.
  20. echo.
  21. echo You can close this window to stop now. Detailed instructions to install these
  22. echo tools manually are available at https://github.com/nodejs/node-gyp#on-windows
  23. echo.
  24. pause
  25. cls
  26. REM Adapted from https://github.com/Microsoft/windows-dev-box-setup-scripts/blob/79bbe5bdc4867088b3e074f9610932f8e4e192c2/README.md#legal
  27. echo Using this script downloads third party software
  28. echo ------------------------------------------------
  29. echo This script will direct to Chocolatey to install packages. By using
  30. echo Chocolatey to install a package, you are accepting the license for the
  31. echo application, executable(s), or other artifacts delivered to your machine as a
  32. echo result of a Chocolatey install. This acceptance occurs whether you know the
  33. echo license terms or not. Read and understand the license terms of the packages
  34. echo being installed and their dependencies prior to installation:
  35. echo - https://chocolatey.org/packages/chocolatey
  36. echo - https://chocolatey.org/packages/python
  37. echo - https://chocolatey.org/packages/visualstudio2019-workload-vctools
  38. echo.
  39. echo This script is provided AS-IS without any warranties of any kind
  40. echo ----------------------------------------------------------------
  41. echo Chocolatey has implemented security safeguards in their process to help
  42. echo protect the community from malicious or pirated software, but any use of this
  43. echo script is at your own risk. Please read the Chocolatey's legal terms of use
  44. echo as well as how the community repository for Chocolatey.org is maintained.
  45. echo.
  46. pause
  47. cls
  48. "%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 [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString(''https://chocolatey.org/install.ps1'')); choco upgrade -y python visualstudio2019-workload-vctools; Read-Host ''Type ENTER to exit'' ' -Verb RunAs