With Windows 10 how can I shut down without installing updates?

63

21

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).

Bryce

Posted 2016-01-22T19:48:27.567

Reputation: 2 038

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 – 2016-10-04T22:27:10.910

1See also Windows 10 ""Feedback Hub". – Bryce – 2016-10-05T05:57:43.363

Ever tried the Powershell CMD-let Stop-Computer? You could try:Stop-Computer -computerName YOURCOMPUTERSNAME -force – John aka hot2use – 2016-10-06T11:07:52.953

For Windows 10 computers I don't see an easy way of rebooting without installing updates. Microsoft should fix this. Give us at least one reboot before requiring automatic installs. Aye! – wbeard52 – 2016-10-18T16:40:30.723

Bryce - What you think about Accepting an Answer on one of the below? Just curious on your thoughts about that since this had been open for a while.

– Pimp Juice IT – 2017-03-18T03:48:34.233

3@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 – 2017-04-24T10:06:46.747

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 – 2017-07-12T04:06:53.773

As another brute force solution other than yanking the cord / pulling batteries, I'd imagine that causing a BSOD would do it, though I'm not sure if I would recommend that in anything other than an emergency.

– jrh – 2018-01-11T17:01:19.297

1How can Windows keep up this BS is beyond me – Firebug – 2018-03-14T21:33:58.497

Answers

13

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

Toastgeraet

Posted 2016-01-22T19:48:27.567

Reputation: 231

2What 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 – 2016-08-24T18:59:29.727

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. – Toastgeraet – 2016-08-25T11:52:32.927

@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 – Toastgeraet – 2016-08-25T12:11:31.480

1Interesting, 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 – 2016-08-31T20:11:54.637

@CularBytes What do you mean, 'it would take a lot of time'? To develop some solution? Right now im on a windows xp machine, so i can't test for Win10, but there are snippets that can be compiled into an executable and let you shutdown - i believe without updates (not verified). Important thing to note: privileges must be acquired, first. Example here

– Toastgeraet – 2016-09-01T06:28:11.227

Well, shutting down with the wrong method (that does install updates) you would have to wait for the next updates again. If you found out what method/function makes sure no updates are installed for shutting down then indeed, we could make an executable to shutdown without updates. – CularBytes – 2016-09-01T10:05:24.330

If power button does a shutdown, it will still install pending updates. If you set it to do a power off, it does that, but any open files are not saved and temp files are not cleaned up. This can cause orphaned files, at best, and file corruption, and registry corruption (probably worst). – Xalorous – 2016-10-05T11:24:38.770

Interesting - on my notebook, the "power-button-shutdown"-method, never installed pending updates, contrary to your description and to shutting down via other menus or commands. – Toastgeraet – 2016-10-07T09:16:19.573

Does this still work? Microsoft has systematically removed the ability to shutdown or restart without updating so that any of the many tips and tricks would no longer work. Publicize a new method to bypass the system and Microsoft will patch it in the next update. I would be very surprised if this still works in 2017. – ADTC – 2017-04-24T16:56:48.090

1This worked for me on the latest version of Windows 10 as of the time of writing – Doctor Jones – 2017-11-26T12:53:42.240

This no longer seems to work on Windows 10. – Cerbrus – 2018-08-16T06:37:45.717

This worked for shutting down -- but it insisted on installing updates when I then turned the computer on.... – Basya – 2019-03-13T15:03:42.043

11

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

Pimp Juice IT

Posted 2016-01-22T19:48:27.567

Reputation: 29 425

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 – 2016-10-01T18:29:50.163

1Option #2 is really interesting. However, it only prevents the updates from downloading, not from installing. – Bryce – 2016-10-02T00:28:59.613

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. – Pimp Juice IT – 2016-10-02T04:18:39.917

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

Bryce

Posted 2016-01-22T19:48:27.567

Reputation: 2 038

3Did this yesterday: WindowsKey+R and shudown -r -t 00 and it did not work. Updates were still installed. – predi – 2016-05-06T06:44:03.933

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 – 2016-08-24T18:57:32.973

@Bryce The -r will trigger a restart, correct? So we can / should use -t and -f? whats the strategy here? – Alex S – 2016-08-24T19:02:14.050

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 – 2016-08-28T16:27:06.270

@Bryce -f is force, and it does close apps without saving. -t x is required. shutdown -r -t 0 is sufficient in most cases. – Xalorous – 2016-10-05T11:22:02.347

this didn't work for me. updated regardless. – S. Tarık Çetin – 2018-09-14T01:33:33.350

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

harrymc

Posted 2016-01-22T19:48:27.567

Reputation: 306 093

1I 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 – 2016-10-01T19:06:13.363

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 – 2016-10-01T19:23:15.263

1Method #2 does not work. – Bryce – 2016-10-02T00:26:33.990

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 – 2016-10-02T07:02:52.457

I have added the modified .bat script in my answer. – harrymc – 2016-10-02T13:06:59.443

@harrymc have you tested your batch method? I would want to adopt it and call it "Nuke WU and shutdown.cmd" – ADTC – 2017-04-24T16:59:59.033

@ADTC: Untested by me, but claimed by the original source and my changes were relatively minor. – harrymc – 2017-04-24T19:17:01.573

1I 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 – 2018-04-05T17:29:34.527

2

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

Bryce

Posted 2016-01-22T19:48:27.567

Reputation: 2 038

1You asked the question... did it work? – rahuldottech – 2016-10-02T08:19:08.183

Waiting for an update to come from MS, to test. – Bryce – 2016-10-06T06:44:49.383

If it was in 8, it could work fine in 10. – Overmind – 2017-01-17T13:45:21.643

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 – 2019-09-27T23:54:34.677

0

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.

Dale Mahalko

Posted 2016-01-22T19:48:27.567

Reputation: 205

-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.

Xalorous

Posted 2016-01-22T19:48:27.567

Reputation: 459

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 – 2016-10-05T19:59:02.263

3@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 – 2016-10-06T06:21:30.573

I can feel you! – Toastgeraet – 2016-10-07T09:19:19.670

2"home environment" ... "purchase a server license and install a WSUS server on your network" ... WHAT? – ADTC – 2017-04-24T11:23:36.667