Last active
March 15, 2019 00:01
Hands-off script to fully patch a fresh Windows install
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:: autoupdate.bat - hands-off script to fully patch a fresh Windows install (https://git.io/vzWKw) | |
:: | |
:: Usage: save this file to %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup and run it | |
:: | |
:: Derived from a post by EzR (http://serverfault.com/a/732084/55554) | |
:begin | |
wuauclt /DetectNow | |
wuauclt /UpdateNow | |
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" >nul 2>&1 && shutdown -r -t 0 | |
timeout /t 60 | |
goto begin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment