3

Here's the thing - the "shutdown -a" option doesn't work, there is no "Restart Later" button, just a countdown timer of 15 minutes and no way to cancel it.

What should I do? I read somewhere that if I lock, it will freeze the timer until my next logon, but I don't wanna wait until "the time is right".

pauska
  • 19,620
  • 5
  • 57
  • 75
interhost
  • 33
  • 1
  • 1
  • 3

2 Answers2

11

The timer is part of the windows update service not the OS itself so you can stop it by stopping the service try net stop "windows update"that should do the trick.

But this is a temp solution since the service will start again when you reboot later, I guess what you really want is forcing the Windows to do the restart at the update scheduling time, basically you need to add a registry entry to do so, try this link http://support.microsoft.com/kb/2835627

montss
  • 406
  • 5
  • 11
  • stopping the service is a good temporary solution so thank you for that. What I eventually did is disable the service and set automatic updates off. – interhost Sep 23 '13 at 13:49
1

I recommend using the PSWindowsUpdate powershell module. It allows you to ignore reboots.

Import-Module PSWindowsUpdate
Get-WUInstall -AcceptAll -IgnoreReboot

If you get error "The specified module 'PSWindowsUpdate' was not loaded because no valid module file was found..." you may need to download and install it with this script.

$webDeployURL = "https://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc/file/41459/43/PSWindowsUpdate.zip"
$filePath = "$($env:TEMP)\PSWindowsUpdate.zip"
(New-Object System.Net.WebClient).DownloadFile($webDeployURL, $filePath)
$shell = New-Object -ComObject Shell.Application
$zipFile = $shell.NameSpace($filePath)
$destinationFolder = $shell.NameSpace("C:\Program Files\WindowsPowerShell\Modules")
$copyFlags = 0x00
$copyFlags += 0x04 # Hide progress dialogs
$copyFlags += 0x10 # Overwrite existing files
$destinationFolder.CopyHere($zipFile.Items(), $copyFlags)
# Clean up
Remove-Item -Force -Path $filePath
Import-Module PSWindowsUpdate
spuder
  • 1,725
  • 3
  • 26
  • 42