From 23c02c06c33d34cd8a28da731f5445c863884750 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 31 Oct 2018 00:52:35 +0000 Subject: [PATCH] win: add prompt to tools installation script Fixes: https://github.com/nodejs/Release/issues/369 --- tools/msvs/install_tools/install_tools.bat | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/msvs/install_tools/install_tools.bat b/tools/msvs/install_tools/install_tools.bat index 1585b5b7c96e04..6cac26ee6d86ac 100644 --- a/tools/msvs/install_tools/install_tools.bat +++ b/tools/msvs/install_tools/install_tools.bat @@ -1,5 +1,7 @@ @echo off +setlocal + cls echo ==================================================== echo Tools for Node.js Native Modules Installation Script @@ -64,6 +66,14 @@ echo in fact it is just a normal Windows Updates reboot cycle. echo. echo If this is not what you would like to occur, you can close this window echo to stop now. -pause +:acceptretry +echo. +echo Your computer may REBOOT SEVERAL TIMES WITHOUT FURTHER WARNING. +echo Please type YES followed by enter to confirm that you have saved all your +set /p "ACCEPT_PROMPT=work and closed all open programs: " +if /i not "%ACCEPT_PROMPT%"=="yes" ( + echo Please type YES to confirm, or close the window to exit. + goto acceptretry +) "%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