Perform instructions below at your own risk:
To automate windows update these instructions may or may not work for your system however it appears to work to an extent for Windows 7 as these instructions were tested on Windows 7.
MUST READ: 1. If the step below does not work verify then you are most likely part of a domain and your security policy may not allow you to perform steps below! 2. UAC prompts were also disabled for the duration of the windows updates so the batch files can run without interruption; be careful to restore this to default when done
Caution this step will make your computer less secure, immediately remove this after your computer is completely up to date. Set a reminder for 24 hours later if need be:
1.
First you will have to make sure your computer automatically logs into a user. You can do this by clicking start menu, type "netplwiz", press enter or open the wizard, under the users tab, select your username, and un-check "require password", type your password, close this window.
2.
Create 3 batch files to start the automated process. (Open notepad paste each code into a separate notepad and perform a save as corresponding_file_name.bat)
One. Save as: any_name.bat then copy this batch file to your startup folder for the user you made auto login. (Click start > All Programs > Startup)
start "" c:\autoupdate1.bat
exit
Two. Save as: autoupdate1.bat then copy this to C:\ drive
wuauclt /detectnow
wuauclt /updatenow
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\WindowsUpdate\Auto Update\RebootRequired" > nul && shutdown -r -t 0
start "" c:\autoupdate2.bat
exit
Three. Save as: autoupdate2.bat then copy this to C:\ drive
ping 127.0.0.1 -n 61 > nul
start "" c:\autoupdate1.bat
exit
Restart or open the batch file in the startup folder and watch the magic begin!
3.
When it is completely done updating just delete the batch files from the startup folder & c:\ drive
Once again follow these instructions at your own risk as it can create an endless loop if you do not know how to stop this process by removing it from the startup folder or going into windows under safe-mode to remove the batch files
Final notes: If you run into issues running the batch files chances are you may have to look up how to disable UAC prompts for your Windows version
A windows machine will automatically install updates and restart (if necessary) in the installation schedule configured at the GPO.
Defaults are: Install updates 03AM every day, prompt user to restart or postpone.
You can define weekly installations, automatic restart and no postpone.
GPO Settings involved [Computer\Administrative Templates\Windows Components\Windows Update]:
- Configure automatic updates
- Auto download and schedule the install.
- Choose install day and time.
- Allow Automatic Update immediate installation
- Delay Restart for Scheduled Installations
- Define the amount of time you want to give users before restart.
With that configuration, machines shall restart automatically without waiting for users.
Best Answer
Now that we know the Operating System we can give you a more precise answer.
In Windows Server 2012 R2 you can have Windows install updates during the Automatic Maintenence period, which is the behavior you're seeing now as illustrated in the following image:
Or you can control Windows Updates via Group Policy as in the image below. Leaving the automatic maintenance checkbox unchecked will cause Windows Updates to be installed on the schedule you configure in this Group Policy setting.