I have a Windows box I would like to manage remotely. When I logged in this morning, the Start menu shows a ! next to the Shutdown button, notifying me there are updates to install. But the only option it gives me to install the updates is to then shutdown. Is there not a way to tell it to "install updates and restart" ?
Yes. You can install all of the updates available - via either Windows Update in your Control Panel, or the yellow WU shield in the system tray near the clock. Then, when that's done, you can do a reboot from the Start Menu (or calling shutdown /r from the command line.)
The only other ways to automate it all in one step is via writing your own code (not just a simple script), or using add-on tools, free or commercial, from either MS or 3rd parties.
I see this is an older question, but it's now possible to install updates and then reboot using Powershell. Specifically, you need to download and install the Windows Update PowerShell Module. Then, you can run the command
Get-WUInstall -AcceptAll -AutoReboot
(there are other switches and arguments to control what updates get installed). This will cause Windows to download updates, install them, and then reboot when finished. In my opinion, this is great for servers, because you can run one command and then walk away.There are certain benefits to installing updates during rebooting/shut-down:
The installation is not slowed down, or tampered with by other running software, AVP, etc.
There's no UI to deal with, click through, etc. It goes through faster. When it's done, in case of a reboot, the computer is ready to go.
Unfortunately there seems to be no way to do it with Microsoft provided tools. I use this free utility that will do it for you. I created a shortcut with the following parameters and placed it into my Start button menu:
From what I see it can also reboot and install updates on a remote workstation in an active directory setup.
Read more here.
This shows up high on the "Install and Restart not Install and Shutdown" Google search. Hence, I thought I should add a solution that I ended up writing for this exact annoying problem (people tell me that Win10 has this by default, but I am not on Win10).
This works using two batch files. The first one is called "rebootAfterUpdates.bat"
The second one is called "scheduleRebootAfterUpdates.bat":
Both files are assumed to be in C:\tmp\Scripts\ When Windows nags you to "Install Updates", let it start installing updates. While it installs updates, run "scheduleRebootAfterUpdates.bat".
Background of operation:
If the updates require a reboot, some registry keys (under the WindowsUpdate reg key) are set with value 0x1.
We check if these keys exist in the first bat file. If they do, reboot right away.
Normally, I trigger updates when about to leave work (and about 4-5 hours before midnight).
The second bat creates a scheduled task (or updates an existing task to run 5 min before midnight) and this scheduled task executes the first bat.
So... while not the most elegant solution, in two steps (1. trigger 'Install Updates' and 2. run the second bat file), your machine will reboot near midnight assuming that installation of updates succeeded.
Additionally, you can set the 'Wake machine to execute task' from the Task Scheduler GUI as well as check the execution return code to see what happened last time.
P.S. Tested on Win7 64bit.
There is no way to initate a "Install Updates and Restart" manually. You could set a time for the updates to install, and then specify that the machine can reboot after Automatic Updates, either via the Automatic Updates (or Windows Update) control panel, directly via the registry, or via Group Policy:
http://support.microsoft.com/kb/328010
But as far as a one-click "Install updates and reboot" option, there is none.