-
Notifications
You must be signed in to change notification settings - Fork 30.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win: add prompt to tools installation script #23987
Changes from 3 commits
d8525d6
91d99c6
23c02c0
078745a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
@echo off | ||
|
||
setlocal | ||
|
||
cls | ||
echo ==================================================== | ||
echo Tools for Node.js Native Modules Installation Script | ||
|
@@ -47,7 +49,31 @@ 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 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 | ||
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. | ||
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" ( | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this handle case sensitivity? You are asking for "YES", and this accepts "yes" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps we can pull these two lines out since you reference this below.