66

With Windows 7 it was possible to use the task manager screen to shut down without applying updates (see How to shut down the computer without the update on Windows 7? ). But that did not work for me on Windows 10.

How can I shut down Windows 10 without installing updates. I might want this because:

  • I need to shut down or reboot quickly
  • The computer is acting funny and that's why I need to reboot (yeah, it's still Windows), and I don't trust running updates at that time. No point in making a bad problem worse.

My Window 10 shutdown menu reads:

  • Sleep
  • Update and shut down
  • Update and restart

The old Windows 7/8 trick does not work. New versions of Windows 10 have altered previous workarounds. Microsoft has lots of feedback on the topic, but has not taken action. See for example:

feedback-hub:?contextid=158&feedbackid=1e175952-a19f-4cca-b1fb-d248945e9fe1&form=1&src=2

Or search "Allow users to defer updates: on shutdown and on startup." in the Microsoft Feedback Hub (search for "Feedback Hub" in Windows 10).

9
  • How about some simpler questions: How can we debug, by seeing a list of pending updates? Can we force updates to be pending, so we can try out various solutions?
    – Bryce
    Oct 4 '16 at 22:27
  • 1
    See also Windows 10 ""Feedback Hub".
    – Bryce
    Oct 5 '16 at 5:57
  • 4
    @Bryce Add one more reason: There is an update that keeps failing to install, and Windows insists on trying again on every shut down or reboot.
    – ADTC
    Apr 24 '17 at 10:06
  • 3
    @ADTC and yet another reason (in countries like mine, with shortage of electricity): There is an electricity outage, and the UPS standby time is only 2 minutes that is enough for a proper shutdown but not for updates.
    – MJ Khan
    Jul 12 '17 at 4:06
  • 2
    How can Windows keep up this BS is beyond me
    – Firebug
    Mar 14 '18 at 21:33
13

Edit: This solution is deprecated for current versions of Win 10. See other answers for possible solutions.


I had the same problem - @TNALLY almost had it.

My solution:

  • Power Options -> Choose what the power buttons do
  • set option to shutdown
  • press power button once - hurray: shutdown without updates
13
  • 3
    What do I do with my VM that has Win 10 1511 with the same issue? You're leveraging Power button "what to do" But may not always apply. PS: Maybe we ought to ask, what is that POWER BUTTON triggering to get your QUICK SHUTDOWN without Updates. Is it executing a FORCE shutdown?
    – Alex S
    Aug 24 '16 at 18:59
  • Good case. It looks like it is shutting down properly for me. I don't really know what it is triggering in the background - that is the golden question. And you're right - it may not always apply. Sorry i cannot help you any further with your VM, but if you find out anything, I'd be very interested to know. Thank you for your valuable comment. Aug 25 '16 at 11:52
  • @AlexS I got one more idea. I think the menu is probably interacting with the windows api. Could be the ShutdownFunctions within the advapi32.dll Aug 25 '16 at 12:11
  • 1
    Interesting, it works for me as well, would take a lot of time to execute all shutdown options via the advapi, can we somehow log this?
    – CularBytes
    Aug 31 '16 at 20:11
  • 1
    This worked for me on the latest version of Windows 10 as of the time of writing Nov 26 '17 at 12:53
12
+50

Okay, so right after I posted the below Original Answer content, I actually ran the same script on my Windows 10 machine, and guess what... Windows Updates started to install anyway.

It seems that Microsoft has made some changes with Windows 10 to ensure security updates get installed on the OS to patch security vulnerabilities, and rightfully so in the name of security.

It seems what you are asking for Windows 10 may not have a 100% for sure method to completeas you requested exactly without disabling Windows Updates altogether.

If a Windows update already installed (or is installing) while you are logged in behind the scenes prior to the forceful reboot, and even after stopping Windows Update services, etc. Windows 10 seems smart enough to still wait for any pending updates or perhaps rollback whatever changed that wasn't 100% committed to the system before power cycling the OS.


Dangerous Workaround

I suppose you could simply hard boot your machine by disconnecting the power source, holding down the power button, etc. but this would essentially emulate an unexpected power outage and you will have potential for corruption of the file system and so on.


Halfway Workarounds

I found a couple other sources I wanted to post for potential halfway or workaround methods to maybe help with some non-security updates or for better controlling when to allow updates to even be downloaded—it won't have anything to install if there is nothing downloaded.

Option 2: Setup A Metered Connection

Windows 10 offers users on metered connections a compromise: to save bandwidth Microsoft confirms the operating system will only automatically download and install updates it classifies as ‘Priority’.

While Microsoft doesn’t reveal its method of classification, this does cut down more frivolous updates which typically include new drivers and software features – both of which have already caused stability problems.

  1. Open the Settings app (Win + I)
  2. Open the ‘Network & Internet’ section
  3. Open ‘Wi-Fi’ and click ‘Advanced Options’
  4. Toggle ‘Set as metered connection’ to ‘On’

Note: If your PC uses an Ethernet cable to connect to the Internet the Metered Connection option will be disabled as it works with Wi-Fi connections only (silly I know).

Option 3: Group Policy Editor

This is a halfway house: the group policy editor will notify you about new updates without automatically installing them (how previous generations of Windows always worked) – though again security updates will still install automatically.

Note: Windows 10 Home users have to sit this one out, it is only for Windows 10 Education, Pro and Enterprise editions.

  1. Open the Run command (Win + R), in it type: gpedit.msc and press enter
  2. Navigate to: Computer Configuration -> Administrative Templates -> Windows Components -> Windows Update
  3. Open this and change the Configure Automatic Updates setting to ‘2 – Notify for download and notify for install’
  4. Open the Settings app (Win + I) and navigate to -> Update and Security -> Windows Updates. Click ‘Check for updates’ which applies the new configuration setting
  5. Restart

source


Important

As stated here in the Stop Windows 10 from automatically updating your PC post, I think it is important to know that, "As a general rule, an up-to-date operating system is a secure operating system. Windows 10 automatically checks for, downloads and installs new updates to your PC -- whether you like it or not. This new feature is actually pretty convenient for most users, but not everyone wants their operating system updated on Microsoft's schedule." source


Surge Protection and Power Outages

To protect yourself from an unexpected power outage or electrical surge, you should consider UPS battery backups and surge protection. If your PC is powered on or plugged into an electrical receptacle and you are not present when one of these situations occur, or are more likely to occur (e.g. thunderstorm) you can proactively protect your system at this level regardless. Additionally, for critical data in your system, consider performing routine backups accordingly elsewhere off this machine such as external media, secure remote cloud backup, etc.


Original Answer

For a quick and not so clean way to do this, you could kill any running or applicable Windows services related to Windows Updates, and then perform the forceful restart.

Save the Batch Script logic in the example below to a text document and rename it to <something>.cmd to your desktop. Be sure to right-click it and select run as administrator when you need to perform this as you explain in instances where you are available to do so.

Batch Script

@ECHO ON

FOR %%B IN (wuauserv,BrokerInfrastructure) DO NET STOP %%B
SHUTDOWN -r -t 01
GOTO EOF

Further Resources

5
  • I appreciate the answer. I am hoping someone will find a work-around. I do have UPS power supplies and the computer gets a signal to shut down if power is lost but I don't want the computer to update in that situation. I want it to shut down normally.
    – wbeard52
    Oct 1 '16 at 18:29
  • 1
    Option #2 is really interesting. However, it only prevents the updates from downloading, not from installing.
    – Bryce
    Oct 2 '16 at 0:28
  • 1
    @Bryce - Yes, it basically allows you to control when to download such updates (a precursor to installing them) and thereby install them afterwards with a reboot, etc. This gives you a halfway workaround or some control to do this operation at your convenience, or when no inclement weather, etc. is on the forecast. Oct 2 '16 at 4:18
  • "Rightfully" is definitely not the right adjective to use in regards to your OS forcing you to install something, and the very reason so many people choose to not use this particular OS. If I want my PC to have unpatched security updates, then that is my prerogative, and I should not have to jump through hoops just to turn my PC off without them. Security updates are no exception. Feb 18 at 4:46
  • @DrinkMorePimpJuiceIT I typically only use Windows for development code, but my comment had nothing to do with security or lack thereof. It was about OS design-choices that take control from the user, and enforce a behavior that in many cases is not desired, and then making in extremely unfriendly to a user who wants to change that behavior. The fact that it is security-related is irrelevant. Preventing a user from simply shutting down their system when they want is inexcusable for any and all possible reasons. Feb 18 at 8:10
8

Update: this way no longer works.

Best way I've found is hit "Windows-R" to bring up a command prompt, then type "shutdown -r -t 5" to give 5 seconds warning then shut down.

Options for that command include:

-f = force
-r = restart
-t = time
6
  • 4
    Did this yesterday: WindowsKey+R and shudown -r -t 00 and it did not work. Updates were still installed.
    – predi
    May 6 '16 at 6:44
  • 1
    @Bryce - Thanks. I think the key issue is that people need to stop treating Win 10 behaviors the same way as Win 7/8 and previous OSes. Why? MS is doing a lot of PUSHes without asking and the predictability of what can happen is changing a lot more than before.
    – Alex S
    Aug 24 '16 at 18:57
  • @Bryce The -r will trigger a restart, correct? So we can / should use -t and -f? whats the strategy here?
    – Alex S
    Aug 24 '16 at 19:02
  • 1
    @AlexS the -f I think ignores applications that delay reboot, and is not directly on topic to the issue of rebooting without installing updates.
    – Bryce
    Aug 28 '16 at 16:27
  • 1
    this didn't work for me. updated regardless. Sep 14 '18 at 1:33
3

Perhaps this will work: http://www.askvg.com/how-to-disable-install-windows-updates-and-shut-down-option-in-windows-start-menu/

In Windows 8 one could add the following registry key:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Policies\Microsoft\Windows\WindowsUpdate\AU]
"NoAUAsDefaultShutdownOption"=dword:00000001
5
  • 1
    You asked the question... did it work?
    – undo
    Oct 2 '16 at 8:19
  • Waiting for an update to come from MS, to test.
    – Bryce
    Oct 6 '16 at 6:44
  • If it was in 8, it could work fine in 10.
    – Overmind
    Jan 17 '17 at 13:45
  • Seems like I do not have that option Registry path on my system. (I am running Microsoft Windows 10 Education, version 10.0.18362, for what it's worth.) I will be searching across my registry for that key.
    – Spencer D
    Sep 27 '19 at 23:54
  • Sadly, no longer working on Windows 10. That's the same as going on GPEDIT, User config, Admin templates, Windows Components, Windows Update, and then the option there about what the key name says. And it setting applies at most to Windows 7. That one and the equivalent to NoAUShutdownOption, which say the same. No idea how you were able to get it to work on Windows 8 though. But on Windows 10 it seems not to work anymore, like Microsoft states there (using Windows 10 LTSC Build 1809).
    – DADi590
    Feb 7 at 19:38
3

An (untested) idea is to clean out the downloaded updates, so forcing Windows to re-download, for which it won't have time if we do an immediate shut down.

Here is a .bat file that in theory should clean out Windows Updates. It was adapted from the article by Shawn Brink : How to Reset Windows Update in Windows 10.

@echo off

set b=0

:bits
set /a b=%b%+1
if %b% equ 3 (
   goto end1
) 
net stop bits
echo Checking the bits service status.
sc query bits | findstr /I /C:"STOPPED" 
if not %errorlevel%==0 ( 
    goto bits 
) 
goto loop2

:end1
cls
echo.
echo Cannot reset Windows Update since "Background Intelligent Transfer Service" (bits) service failed to stop.
echo.
pause
exit

:loop2
set w=0

:wuauserv
set /a w=%w%+1
if %w% equ 3 (
   goto end2
) 
net stop wuauserv
echo Checking the wuauserv service status.
sc query wuauserv | findstr /I /C:"STOPPED" 
if not %errorlevel%==0 ( 
    goto wuauserv 
) 
goto loop3

:end2
cls
echo.
echo Cannot reset Windows Update since "Windows Update" (wuauserv) service failed to stop.
echo.
pause
exit

:loop3
set app=0

:appidsvc
set /a app=%app%+1
if %app% equ 3 (
   goto end3
) 
net stop appidsvc
echo Checking the appidsvc service status.
sc query appidsvc | findstr /I /C:"STOPPED" 
if not %errorlevel%==0 ( 
    goto appidsvc 
) 
goto loop4

:end3
cls
echo.
echo Cannot reset Windows Update since "Application Identity" (appidsvc) service failed to stop.
echo.
pause
exit

:loop4
set c=0

:cryptsvc
set /a c=%c%+1
if %c% equ 3 (
   goto end4
) 
net stop cryptsvc
echo Checking the cryptsvc service status.
sc query cryptsvc | findstr /I /C:"STOPPED" 
if not %errorlevel%==0 ( 
    goto cryptsvc 
) 
goto Reset

:end4
cls
echo.
echo Cannot reset Windows Update since "Cryptographic Services" (cryptsvc) service failed to stop.
echo.
pause
exit

:Reset
Ipconfig /flushdns
del /s /q /f "%ALLUSERSPROFILE%\Application Data\Microsoft\Network\Downloader\qmgr*.dat" 
del /s /q /f "%SYSTEMROOT%\Logs\WindowsUpdate\*"


if exist "%SYSTEMROOT%\winsxs\pending.xml.bak" del /s /q /f "%SYSTEMROOT%\winsxs\pending.xml.bak" 
if exist "%SYSTEMROOT%\winsxs\pending.xml" ( 
    takeown /f "%SYSTEMROOT%\winsxs\pending.xml" 
    attrib -r -s -h /s /d "%SYSTEMROOT%\winsxs\pending.xml" 
    ren "%SYSTEMROOT%\winsxs\pending.xml" pending.xml.bak 
) 

if exist "%SYSTEMROOT%\SoftwareDistribution.bak" rmdir /s /q "%SYSTEMROOT%\SoftwareDistribution.bak"
if exist "%SYSTEMROOT%\SoftwareDistribution" ( 
    attrib -r -s -h /s /d "%SYSTEMROOT%\SoftwareDistribution" 
    ren "%SYSTEMROOT%\SoftwareDistribution" SoftwareDistribution.bak 
) 

if exist "%SYSTEMROOT%\system32\Catroot2.bak" rmdir /s /q "%SYSTEMROOT%\system32\Catroot2.bak" 
if exist "%SYSTEMROOT%\system32\Catroot2" ( 
    attrib -r -s -h /s /d "%SYSTEMROOT%\system32\Catroot2" 
    ren "%SYSTEMROOT%\system32\Catroot2" Catroot2.bak 
) 

shutdown -s -t 0

The methods listed below seem to have been removed in the Windows 10 Anniversary Update.

The article How to Shut Down a Windows PC Without Installing Updates lists three methods :

  1. Press Alt+F4 to access the Shut Down Windows dialog box and select “Shut down” from the drop-down list.

  2. Press Windows+L to lock the screen, or log out. In the lower-right corner of the login screen, click the power button and select “Shut down” from the popup menu.

  3. Run the following command : shutdown -s -t 0

9
  • 1
    I didn't try the ALT-F4 method but did try locking the computer and selecting the power button. I did not have an option to just shut down. My PC is Windows 10 Pro. For #3, I ran shutdown -f -s -t 1 and it still updated.
    – wbeard52
    Oct 1 '16 at 19:06
  • Windows 10 Anniversary Update may have decided to disallow these options. If Alt-F4 does not work either, maybe deleting the downloaded updates will work, so forcing Windows to re-download, for which it won't have time if you shut down fast enough. See this article for a .bat file that can do that - just replace the commands starting with the call to sc.exe and up to the end with a shutdown command. Disclaimer: I have never tried doing that and I guarantee nothing. If it works I will rewrite my answer.
    – harrymc
    Oct 1 '16 at 19:23
  • 1
    Method #2 does not work.
    – Bryce
    Oct 2 '16 at 0:26
  • I have marked in the answer that the Anniversary Update has removed these methods. It would be interesting if the above script (after modification) does work.
    – harrymc
    Oct 2 '16 at 7:02
  • 1
    I tried the BAT, it didn't work... the SoftwareDistribution.bak rename was successful, but somehow it still managed to install some updates on shutdown.
    – AgentRev
    Apr 5 '18 at 17:29
1

There is a way out, but you are basically going to have to crash the system to force an instant shutdown.

Laptops with non-removable batteries and ultra-fast Solid State Drives can be quite annoying because the system will go to sleep very rapidly if you press the power button, rather than turning off.

  • Choose Restart or Shutdown (doesn't matter) and wait for it to say, "Preparing to install updates"
  • Press power button. Laptop goes to sleep in a matter of seconds, but isn't fully turned off.
  • Press power button twice very quickly, and on the second press, keep holding it down.
  • The first press brings the system out of sleep. Windows 10 will quickly resume, but before it can re-initiate sleep, holding the power button for about 5 seconds will force power off regardless of what Windows is doing.
  • System is now turned off completely.
  • The next time you turn on the system, Windows 10 will silently clean up the mess on startup, and not tell you anything.

I occasionally need to do this override when doing mobile device drive imaging. There is no point whatsoever waiting out a long forced update process, if I am just going to be wiping the drive anyway and applying a new preconfigured system image.

-2

I don't trust running updates at that time. No point in making a bad problem worse.

This is the core of the problem here. In order to use Windows in a home environment, you need to either get past this, or purchase a server license and install a WSUS server on your network so that you can control which updates are pushed (I didn't say it was a cheap option, but it is a workable solution), or switch to a new OS. This is the direction MS is going.

Personally, I hated the loss of control, but then I really thought about it. Forced updates are the only way to ensure that most workstations are secure. As a whole, people don't do it right by themselves. In the past I opted for 'download updates and alert me'. When was the last time I elected not to install a security update? Never. When was the last time a security update broke my computer? Again, never. When was the last time I waited days or even weeks to install an update. Almost every time. And I'm a sysadmin who works in a security conscious environment. (The experiences I mention are on my home machines). In my defense, I often go days without using a computer at home. But now all of them, mine and those for my family, are autoupdated. No problem in over a year.

I believe you can still control how optional updates install. I have started autoinstalling security and bugfix updates. If it breaks, I will join the hue and cry, but my Win 10 systems are my home systems, and they're not critical. Systems at work are managed through Enterprise methods like SCCM or WSUS in some cases.

As for preventing an update that is downloaded and queued for install on reboot, the methods which speak to clearing out the downloaded updates are the only way I know.

4
  • I only want to defer updates: maybe once, twice, but not three times. And given how confused windows can get: I want to do a clean reboot then install updates.
    – Bryce
    Oct 5 '16 at 19:59
  • 5
    @Xalorous: So, Bryce asks "How can I do X?", and your answer is "Don't do X; it's a bad idea."?  That's not an answer to the question.
    – Scott
    Oct 6 '16 at 6:21
  • 2
    "home environment" ... "purchase a server license and install a WSUS server on your network" ... WHAT?
    – ADTC
    Apr 24 '17 at 11:23
  • 1
    I'd like to point out that forced updates are themselves neither a solution, nor a very good idea. Microsoft is the only one doing that. Android asks if you want to install an update now, or simply turn off the system. GNU Linux installs at the beck and call of the user, not to mention that it doesn't hold it captive for the installation. Mac OS X, notifies the user, but still offers the option not to update and restart/shutdown. The sheer hubris of telling your clients that there's no better way while everyone else does things better is just astounding. Mar 26 '20 at 20:47

Not the answer you're looking for? Browse other questions tagged or ask your own question.