I use a Win10 computer to control a microscope, and the image acquisition can last 48 hours. If Win10 receives an update and restarts, the entire image stack gets ruined. We have tried many methods to prevent updating, to no avail. Current Win10 versions seem to be really keen on installing updates, no matter what the owner thinks. Is there anything we can do, programmatically if possible (short of pulling out the ethernet plug)?
3 Answers
If the biggest problem is the computer restarting after the update, you can prevent that in registry:
;prevent windows from rebooting when updating
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate]
"NoAutoRebootWithLoggedOnUsers"=dword:1
Disabling updates programatically requires more work in registry. You have to disable:
- Windows Update (wuauserv)
- Windows Update Medic Service (WaaSMedicSvc)
- Microsoft Update Orchestrator Service (UsoSvc)
And possibly some tasks:
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable
Things change with each version of Windows, but I think these should do. For changing the services' startup option to disabled, you need appropriate permissions in registry. You can get the needed permissions with SetACL tool. Startup parameters for services in registry can be found in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services. The value for "disabled" is dword:4.
- 1,327
Microsoft has added system services that cannot be disabled whose purpose is to update Windows, chiefly Update Orchestrator Service, tasked with downloading, installing and verifying the updates. It can be stopped via the Services applet, and this will only work until the next reboot.
Stopping the Update Orchestrator Service is probably enough for your needs.
The above service is restarted by the new Windows Update Medic Service. It is this service that undoes all the traditional methods for blocking Windows Update, so that periodically and unexpectedly one will find out that the Windows Update settings have been reset to their original values and that Windows has gone back to forcing updates upon the user.
The Windows Update Medic Service itself cannot be disabled at all. Any attempt to do so will end with the message of "Access is Denied".
Nevertheless, there exists a third-party product that can totally block Windows Update: Windows Update Blocker. This free product is portable and can disable/enable Windows Update with one click. In fact, it can also block any other unblockable Windows service.
- 498,455
A powershell script incorporating @hextech's helpful answer:
Set-ItemProperty -Path "REGISTRY::HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate" -Name " NoAutoRebootWithLoggedOnUsers" -Value 1
@("wuauserv","waasmedicsvc","usosvc") | Foreach {sc stop "$_" start= disabled}
schtasks /Change /TN "Microsoft\Windows\WindowsUpdate\Automatic App Update" /Disable
- 9,176