From d8525d6a2003a78c4977c68c623a7ea66506e959 Mon Sep 17 00:00:00 2001 From: Rob Reynolds Date: Wed, 31 Oct 2018 09:41:10 -0500 Subject: [PATCH 1/4] win: clarify Boxstarter behavior on install tools Clarify the behavior of what Boxstarter may do when it runs on a box to install all the necessary tools so that there are no surprises to the end user when the script is run. Currently there is no interface that warns the user that Boxstarter will reboot the machine possibly multiple times depending on how many dependencies need to be installed and doesn't mention a need to disable UAC. For folks who see what may look like a reboot loop, we feel it is necessary to make them aware that UAC will be disabled and they will need to take action to re-enable UAC manually if they interfere/stop the script from finishing. --- tools/msvs/install_tools/install_tools.bat | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/tools/msvs/install_tools/install_tools.bat b/tools/msvs/install_tools/install_tools.bat index db10cf1f46049e..e236cadcb52031 100644 --- a/tools/msvs/install_tools/install_tools.bat +++ b/tools/msvs/install_tools/install_tools.bat @@ -47,7 +47,23 @@ echo script is at your own risk. Please read the Chocolatey's legal terms of use echo and the Boxstarter project license as well as how the community repository echo for Chocolatey.org is maintained. echo. -echo You can close this window to stop now. +pause + +cls +echo !!!!!WARNING!!!!! +echo ----------------- +echo Use of Boxstarter may reboot your box automatically multiple times. When +echo performing a reboot, Boxstarter will need to disable UAC to allow the +echo script to run immediately after the reboot. When the scripts have +echo completed, Boxstarter will re-enable UAC. If you prematurely stop the +echo process, UAC will need to be re-enabled manually. +echo. +echo Sometimes the scripts may install all necessary Windows Updates which +echo could cause a high number of reboots that appear to be a reboot loop when +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 "%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 From 91d99c653d5d4514bc3cb419eddb636265b0651b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Wed, 31 Oct 2018 21:44:40 +0000 Subject: [PATCH 2/4] fixup: address feedback from Trott --- tools/msvs/install_tools/install_tools.bat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/msvs/install_tools/install_tools.bat b/tools/msvs/install_tools/install_tools.bat index e236cadcb52031..1585b5b7c96e04 100644 --- a/tools/msvs/install_tools/install_tools.bat +++ b/tools/msvs/install_tools/install_tools.bat @@ -52,11 +52,11 @@ pause cls echo !!!!!WARNING!!!!! echo ----------------- -echo Use of Boxstarter may reboot your box automatically multiple times. When -echo performing a reboot, Boxstarter will need to disable UAC to allow the -echo script to run immediately after the reboot. When the scripts have -echo completed, Boxstarter will re-enable UAC. If you prematurely stop the -echo process, UAC will need to be re-enabled manually. +echo Use of Boxstarter may reboot your computer automatically multiple times. +echo When performing a reboot, Boxstarter will need to disable User Account +echo Control (UAC) to allow the script to run immediately after the reboot. When +echo the scripts have completed, Boxstarter will re-enable UAC. If you prematurely +echo stop the process, UAC will need to be re-enabled manually. echo. echo Sometimes the scripts may install all necessary Windows Updates which echo could cause a high number of reboots that appear to be a reboot loop when 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 3/4] 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 From 078745a70780372b38f9327edf56684bda98047d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Thu, 1 Nov 2018 18:10:21 +0000 Subject: [PATCH 4/4] fixup for d8525d6a2003a78c4977c68c623a7ea66506e959 --- tools/msvs/install_tools/install_tools.bat | 3 --- 1 file changed, 3 deletions(-) diff --git a/tools/msvs/install_tools/install_tools.bat b/tools/msvs/install_tools/install_tools.bat index 6cac26ee6d86ac..36456fa6f656a9 100644 --- a/tools/msvs/install_tools/install_tools.bat +++ b/tools/msvs/install_tools/install_tools.bat @@ -63,9 +63,6 @@ echo. echo Sometimes the scripts may install all necessary Windows Updates which echo could cause a high number of reboots that appear to be a reboot loop when 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. :acceptretry echo. echo Your computer may REBOOT SEVERAL TIMES WITHOUT FURTHER WARNING.