Windows update: Install at night

In order to keep my users from getting windows update messages, I try to install any client updates at night. I have a few tricks to make this possible:

1: Boot up at night

Most computers can boot up automatically at night, using Wake-On-LAN. If your computer or its NIC does not support WOL, you can use the bios' power management to boot at night.

Don't start all computers at the exact same time, as this will result in a power peak - better spread it, like 5 computers per minute.

2: Use deadlines

In WSUS, in the approve box, you can set a deadline. If you set it to any time before the expected nightly boot, the update will be installed immediately when picked up.

3: Force update detection

I described in another post how to force update detection. You can use this script in the startup scripts of the computer, but this will slow down bootup when the user wants to login in the morning. Therefore, I make a few changes to the batch file to force update detection only at night:

@echo off
cls
rem
rem Fetch the time
FOR /F "TOKENS=1 DELIMS=:" %%a in ('time /t') do set cdate=%%a
rem
rem The following lines will skip this script if it's not night.
if (%cdate%)==(5) GOTO NOTNOW
if (%cdate%)==(05) GOTO NOTNOW
if (%cdate%)==(6) GOTO NOTNOW
if (%cdate%)==(06) GOTO NOTNOW
if (%cdate%)==(7) GOTO NOTNOW
if (%cdate%)==(07) GOTO NOTNOW
if (%cdate%)==(8) GOTO NOTNOW
if (%cdate%)==(08) GOTO NOTNOW
if (%cdate%)==(9) GOTO NOTNOW
if (%cdate%)==(09) GOTO NOTNOW
if (%cdate%)==(10) GOTO NOTNOW
if (%cdate%)==(11) GOTO NOTNOW
if (%cdate%)==(12) GOTO NOTNOW
if (%cdate%)==(13) GOTO NOTNOW
if (%cdate%)==(14) GOTO NOTNOW
if (%cdate%)==(15) GOTO NOTNOW
if (%cdate%)==(16) GOTO NOTNOW
if (%cdate%)==(17) GOTO NOTNOW
if (%cdate%)==(18) GOTO NOTNOW
if (%cdate%)==(19) GOTO NOTNOW
if (%cdate%)==(20) GOTO NOTNOW
if (%cdate%)==(21) GOTO NOTNOW
rem
rem Don't run this script every day not to
rem intervene with already scheduled update installations
FOR /F "TOKENS=1" %%a in ('date /t') do set cdate=%%a
if (%cdate%)==(mo) GOTO NOTNOW
if (%cdate%)==(we) GOTO NOTNOW
if (%cdate%)==(fr) GOTO NOTNOW
net stop wuauserv
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v LastWaitTimeout /f
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v DetectionStartTime /f
REG DELETE "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update" /v NextDetectionTime /f
rem
net start wuauserv
wuauclt /detectnow
rem
:NOTNOW

© GeekLabInfo Windows update: Install at night is a post from GeekLab.info. You are free to copy materials from GeekLab.info, but you are required to link back to http://www.geeklab.info
1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 2,50 out of 5)
Loading...

Geef een reactie

Het e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

*

code