The most annoying feature of Windows 10, the automatic reboots after a Windows Update. You are in the middle of your work and that popup comes up again, “You should really install updates right now”. Eventually, you can’t postpone it anymore and Windows will just reboot. Your tried creating a GPO, disabled the update services even considered using a program for it. But all it takes is a simple registry key to stop the automatic restart of Windows 10 after an update.
Windows updates are important and to install them properly your computer needs to be restarted at some point. So if you are going to disable the automatic restart completely, also make sure you create a habit, or script if you are applying this company-wide, to restart the computer regularly.
Stop Automatic Restart Windows 10 with a registry key
Let’s first start with the solution you are looking for, stopping the automatic restart after a Windows Update. What we are going to do is add a key in the registry that will block the notifications with the messages that you need to restart or that updates are available. By blocking the notification you will prevent Windows from rebooting automatically.
Before Win 10 1803 you could simply block the UpdateOrchestrator\Reboot task, but Microsoft disabled that option in 1803. The UpdateOrchestrator\Reboot task is using the MusNotification.exe executable to show the notifications.
In the registry, you will find the Image File Execution Options key with a lot of subkeys referring the executables. These subkeys can control a lot about Windows Executables, and one of the things we can do is redirect the execution of the file to a debugger.
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options
Create and import the reg file
- Create a new text file on your desktop and name it stopreboot.reg
- Past the following content in it
1234Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\MusNotification.exe]"Debugger"="cmd.exe"
- Save the file and close it
- Open the file to import the reg key. You will get a warning, just click yes.
You might not see the file extension when you create a new file (so you don’t see .txt at the end of the file name). Open your explorer and go to the View tab and select File Name Extension in the toolbar.
Check if the key is installed successfully
To check if the key is correctly installed we can open the registry.
- Click on Start and type Regedit <enter>
- Navigate to HKEY_LOCAL_MACHINE > SOFTWARE > Microsoft > Windows NT > CurrentVersion > Image File Execution Options
- Find the key MusNotification.exe
- You will see the Debugger value on the right side.
This should work for all Window 10 version. If you are using Windows 10 Enterprise I recommend you use the GPO option. If you implement this registry hack to prevent the automatic restart, make sure you restart regularly or create a script that will reboot all the computer in your network in the weekends.
Create a reboot script
The goal for the registry key is to prevent unwanted reboots. But with Windows Updates and for Windows, in general, it’s important to reboot the computer once a week. This allows updates to finish so new ones can be installed. We can use a PowerShell script to check if a reboot is required and run this script at a moment that you are not working.
- Install the pending reboot module
Open PowerShell and run the following cmd to install the pending reboot module:
1Install-Module -Name PendingReboot
- Check if a reboot is required
Is will return true or false. You can also run this cmdlet against a remote computer
1(Test-PendingReboot).IsRebootPending -ComputerName DC01
- Combine into a script
You can create a simple script that will reboot the computer if a restart is pending.