How can I automate this hack to prevent Windows 10 from restarting automatically?

Reddit user Nyxryu posted this solution to a problem that many people have with Windows 10 - that once updated, it will restart on its own if the appointed time crops up.

I’d like to automate this sequence of steps (so I can easily reverse/reapply it when needed), but have no experience with automation of tasks in Windows. I am comfortable with writing code in general. Advice?

In that thread, a few posts down pcr3 posted this:


cd /d "%Windir%\System32"
takeown /F MusNotification.exe
icacls MusNotification.exe /deny Everyone:(X)
takeown /F MusNotificationUx.exe
icacls MusNotificationUx.exe /deny Everyone:(X)
rem

https://www.reddit.com/r/Windows10/comments/3h6e74/how_do_i_stop_windows_10_from_automatically/czuy1p3

Yeah I’d tried that earlier - it is for something else. Specifically, it’s copy pasted from this question about getting rid of an updates are available message.

Weird that it didn’t work for me though, it seems to be doing (almost) exactly what is suggested. I’ll test it out.

Why do those steps need to be reapplied? The consequences of those actions will persist from one reboot to another. The possible exception being if Windows has some maintenance service that checks for changes like this and reverts them.

One of the side effects of this tweak is that all of the Windows update infrastructure stops working. I’m not understanding any scenario where the good you hope to achieve will be offset by the bad you will create.

I’m further confused in that I don’t understand what problem you’re trying to avoid in the first place. Care to enlighten me/us?

If the updates that Windows 10 downloads from Microsoft require a restart, it pops up a box asking to restart your computer now and giving you the option to postpone for 10 minutes, an hour or 4 hours and that’s it. And it will, once the appointed time arrives, restart regardless of whatever you are doing. This bothers people.

I’ve had Win10 for about 3 months now and have never seen this behavior. I don’t use that machine more than a couple hours at a time a couple days a week. So I may have just missed it.

And yes, that would be annoying behavior if true. So annoying as to be an implausible design choice. I wonder if it’s a malfunction? Not interested enough to do my own research on it.

It applies to the non-pro versions of win10. Basically, you don’t get full control of when important updates are actioned.

Sounds like a way to force-feed updates against serious day zero exploits. It certainly ought not do that for generic servicing updates.

Not sure I agree with their thinking. But they are slowly taking responsibility for the health (or at least security hygiene) of their entire installed base ecosystem. Which IMO net net is a positive change.

You’re only very likely to notice it if you hibernate/suspend the machine when you finish using it - if you shut down completely, then start up again when you next use it (and if you have it set to ‘automatic’ rather than ‘notify’), you’re almost certainly installing updates without really noticing that it’s happening.

Yep, I was annoyed initially but since I installed an SSD, I find I don’t really mind turning my laptop all the way off regularly.

I have Windows 10. I generally just keep my PC running. It reboots itself maybe once a week on average, so I’m guessing it’s doing it for any update needing a restart.

I very recently upgraded from Win7 to Win10. Now, with Win7 I’d get the reboot in 15 minutes box and the option to postpone it or go ahead. And if I told it to wait an hour, 45 minutes later I’d get the same box again.

Are you saying Win10 gives you that popup box only once?

No the box will come again, and Windows 10 lets you reschedule restarts again.

But if your computer is unattended and switched on when the rescheduled time arrives, it will restart regardless of what is going on with your machine.

I do work that needs a lot of computation, and often have code running for long periods of time and/or have coding environments open that do not save work automatically. I have twice lost work because of this behaviour and am not cool with it, hence the need for the workaround.

I want a method to reverse/reapply it easily so I can easily switch to ‘normal’ whenever I have periods of time where it wouldn’t be inconvenient.

There are other ways that it might be possible to control this on a session basis…

You might be able to control this behaviour by flagging your internet connection as ‘metered’ - details here:

Alternatively, just turn off the Windows Update service by opening up a command prompt and typing: stop-service wuauserv
Or you could disable the service by setting it to manual start

Disabling the service only works for so long, though. I’m not sure that it doesn’t schedule the restart in the Task Scheduler.

My suggestion is to download WinAero Tweaker. Then launch the app and use its built in option disable restarts. (Note, I have not used Windows 10 in a while, and only know it worked long ago.)

Oh, and I did sometimes find that the box won’t appear. Or, it does, but I can’t choose to delay anymore.